.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

  NameDescription
Public methodStatic memberCreateEventSource(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.
Public methodStatic memberCreateEventSource(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.
Public methodStatic memberCreateEventSource(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

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 :

Page view tracker