Serilog.Sinks.EventLog 5.0.0-dev-00091
Serilog.Sinks.EventLog
A Serilog sink that writes events to the Windows Event Log.
Important: version 3.0 of this sink changed the default value of manageEventSource from true to false. Applications that run with administrative privileges, and that can therefore create event sources on-the-fly, can opt in by providing manageEventSource: true as a configuration option.
Getting started
First, install the package from NuGet:
dotnet add package Serilog.Sinks.EventLog
The sink is configured by calling WriteTo.EventLog() on the LoggerConfiguration:
Log.Logger = new LoggerConfiguration()
.WriteTo.EventLog("Sample App", manageEventSource: true)
.CreateLogger();
Log.Information("Hello, Windows Event Log!");
Log.CloseAndFlush();
Events will appear under the Application log with the specified source name:

Showing the top 20 packages that depend on Serilog.Sinks.EventLog.
| Packages | Downloads |
|---|---|
|
Serilog.Exceptions
Log exception details and custom properties that are not output in Exception.ToString().
|
28 |
.NET Framework 4.6.2
- Serilog (>= 4.0.0)
.NET Framework 4.7.1
- Serilog (>= 4.0.0)
.NET 6.0
- Serilog (>= 4.0.0)
- System.Diagnostics.EventLog (>= 8.0.0)
.NET 8.0
- Serilog (>= 4.0.0)
- System.Diagnostics.EventLog (>= 8.0.0)
.NET Standard 2.0
- Serilog (>= 4.0.0)
- System.Diagnostics.EventLog (>= 8.0.0)
| Version | Downloads | Last updated |
|---|---|---|
| 5.0.0-dev-00091 | 19 | 01/31/2025 |
| 4.0.1-dev-00087 | 23 | 12/19/2024 |
| 4.0.0 | 22 | 12/29/2024 |
| 4.0.0-dev-00079 | 25 | 12/24/2024 |
| 4.0.0-dev-00077 | 22 | 12/24/2024 |
| 3.1.0 | 24 | 05/29/2024 |
| 3.1.0-dev-00060 | 23 | 05/29/2024 |
| 3.1.0-dev-00056 | 24 | 05/29/2024 |
| 3.1.0-dev-00049 | 22 | 05/29/2024 |
| 3.0.47 | 25 | 05/29/2024 |
| 3.0.37-dev-00048 | 27 | 05/29/2024 |
| 3.0.37-dev-00043 | 29 | 05/29/2024 |
| 3.0.37-dev-00040 | 24 | 05/29/2024 |
| 3.0.37-dev-00038 | 27 | 05/29/2024 |
| 3.0.36 | 24 | 05/29/2024 |
| 2.1.30 | 23 | 05/29/2024 |
| 2.0.22 | 23 | 05/29/2024 |
| 2.0.21 | 28 | 05/29/2024 |
| 2.0.13 | 27 | 05/29/2024 |
| 1.5.11 | 25 | 05/29/2024 |
| 1.5.8 | 23 | 05/29/2024 |
| 1.5.4 | 22 | 05/29/2024 |
| 1.5.3 | 23 | 05/29/2024 |
| 1.5.2 | 26 | 05/29/2024 |
| 1.5.1 | 28 | 05/29/2024 |
| 1.4.196 | 24 | 05/29/2024 |
| 1.4.182 | 27 | 05/29/2024 |
| 1.4.168 | 26 | 05/29/2024 |
| 1.4.155 | 25 | 05/29/2024 |
| 1.4.139 | 23 | 05/29/2024 |
| 1.4.118 | 22 | 05/29/2024 |
| 1.4.113 | 25 | 05/29/2024 |
| 1.4.102 | 22 | 05/29/2024 |
| 1.4.99 | 27 | 05/29/2024 |
| 1.4.97 | 24 | 05/29/2024 |
| 1.4.76 | 26 | 05/29/2024 |
| 1.4.39 | 23 | 05/29/2024 |
| 1.4.34 | 23 | 05/29/2024 |
| 1.4.28 | 25 | 05/29/2024 |
| 1.4.27 | 26 | 05/29/2024 |
| 1.4.23 | 26 | 05/29/2024 |
| 1.4.22 | 27 | 05/29/2024 |
| 1.4.21 | 25 | 05/29/2024 |
| 1.4.18 | 29 | 05/29/2024 |