EventLog

Provides interaction with Windows event logs.

The Wisej.NET EventLog component enables interaction with Windows event logs, which record important software and hardware events. Use it to read existing logs, write entries, manage event sources, and respond to log entries.

The EventLog implements IDisposable. Always dispose of it either:

  • Directly: Call Dispose() in a try/catch block

  • Indirectly: Use language constructs like using (C#) or Using (VB)

Features

Log Management

Access and manage event logs through static EventLog members:

  • List available logs

  • Create or delete logs

  • Create or delete event sources

  • Check source existence on a computer

Default Logs

Windows provides three default event logs:

  • Application: General application events

  • System: Windows system events

  • Security: Security-related events (read-only)

Additional logs may be available from installed applications and services like Active Directory.

For detailed information about working with EventLogs, see:

Last updated

Was this helpful?