CreateEventSource Method
MSDN Home
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
.NET Framework Class Library
System.Diagnostics Namespace
EventLog Class
EventLog Methods
CreateEventSource Method
CreateEventSource Method (Even ...
CreateEventSource Method (Stri ...
CreateEventSource Method (Stri ...
EventLog Methods
BeginInit Method
Clear Method
Close Method
CreateEventSource Method
Delete Method
DeleteEventSource Method
Dispose Method
EndInit Method
Exists Method
GetEventLogs Method
LogNameFromSourceName Method
MemberwiseClone Method
ModifyOverflowPolicy Method
RegisterDisplayName Method
SourceExists Method
WriteEntry Method
WriteEvent Method
Switch View :
Classic
Lightweight Beta
ScriptFree
Feedback
.NET Framework Class Library
EventLog
.
.
::
.
CreateEventSource Method
Establishes an application as able to write event information to a particular log on the system.
Overload List
Name
Description
CreateEventSource(EventSourceCreationData)
Establishes an application as a valid event source for writing localized event messages, using the specified configuration properties for the event source and the corresponding event log.
CreateEventSource(String, String)
Establishes an application, using the specified
Source
, as a valid event source for writing entries to a log on the local computer. This method can also create a new custom log on the local computer.
CreateEventSource(String, String, String)
Obsolete.
Establishes an application, using the specified
Source
, as a valid event source for writing entries to a log on the computer specified by
machineName
. This method can also be used to create a new custom log on the specified computer.
Top
See Also
Reference
EventLog Class
EventLog Members
System.Diagnostics Namespace
Tags :
Community Content
g.plumb
Notes about EventSource naming
If you are creating a custom error log for use within a windows service, ensure that the EventSource is different to the name of your windows service, otherwise it will be logged to the "Application" log, regardless of your EventLog object's .Log source.
Tags :