Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
EventLog Class
EventLog Methods

  Switch on low bandwidth view
Members FilterMembers Filter
Frameworks FilterFrameworks Filter
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
EventLog..::.CreateEventSource Method

Establishes an application as able to write event information to a particular log on the system.

  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
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Notes about EventSource naming      g.plumb   |   Edit   |   Show History
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 What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker