# EventLog

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.

{% hint style="info" %}
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)
  {% endhint %}

## 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.

{% hint style="info" %}
For detailed information about working with EventLogs, see:

* [System.Diagnostics.EventLog on MSDN](https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.eventlog?view=net-5.0)
* [Using Objects that Implement IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable?view=net-5.0)
  {% endhint %}
