Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

EventLog.WriteEntry Method

 

Writes an entry in the event log.

Namespace:   System.Diagnostics
Assembly:  System (in System.dll)

NameDescription
System_CAPS_pubmethodWriteEntry(String)

Writes an information type entry, with the given message text, to the event log.

System_CAPS_pubmethodWriteEntry(String, EventLogEntryType)

Writes an error, warning, information, success audit, or failure audit entry with the given message text to the event log.

System_CAPS_pubmethodWriteEntry(String, EventLogEntryType, Int32)

Writes an entry with the given message text and application-defined event identifier to the event log.

System_CAPS_pubmethodWriteEntry(String, EventLogEntryType, Int32, Int16)

Writes an entry with the given message text, application-defined event identifier, and application-defined category to the event log.

System_CAPS_pubmethodWriteEntry(String, EventLogEntryType, Int32, Int16, Byte[])

Writes an entry with the given message text, application-defined event identifier, and application-defined category to the event log, and appends binary data to the message.

System_CAPS_pubmethodSystem_CAPS_staticWriteEntry(String, String)

Writes an information type entry with the given message text to the event log, using the specified registered event source.

System_CAPS_pubmethodSystem_CAPS_staticWriteEntry(String, String, EventLogEntryType)

Writes an error, warning, information, success audit, or failure audit entry with the given message text to the event log, using the specified registered event source.

System_CAPS_pubmethodSystem_CAPS_staticWriteEntry(String, String, EventLogEntryType, Int32)

Writes an entry with the given message text and application-defined event identifier to the event log, using the specified registered event source.

System_CAPS_pubmethodSystem_CAPS_staticWriteEntry(String, String, EventLogEntryType, Int32, Int16)

Writes an entry with the given message text, application-defined event identifier, and application-defined category to the event log, using the specified registered event source. The category can be used by the Event Viewer to filter events in the log.

System_CAPS_pubmethodSystem_CAPS_staticWriteEntry(String, String, EventLogEntryType, Int32, Int16, Byte[])

Writes an entry with the given message text, application-defined event identifier, and application-defined category to the event log (using the specified registered event source) and appends binary data to the message.

Return to top
Show:
© 2016 Microsoft