Serilog.Sinks.EventLog 4.0.1-dev-00087

Serilog.Sinks.EventLog

Build status NuGet Version

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:

Screenshot

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().
1

.NET Framework 4.6.2

.NET Framework 4.7.1

.NET 6.0

.NET 8.0

.NET Standard 2.0

Version Downloads Last updated
5.0.0-dev-00091 1 2025/6/16
4.0.1-dev-00087 0 2025/6/11
4.0.0 1 2025/9/24
4.0.0-dev-00079 1 2025/6/15
4.0.0-dev-00077 1 2025/6/18
3.1.0 0 2018/6/15
3.1.0-dev-00060 1 2025/9/24
3.1.0-dev-00056 1 2025/9/24
3.1.0-dev-00049 0 2017/11/23
3.0.47 0 2017/11/23
3.0.37-dev-00048 1 2025/9/24
3.0.37-dev-00043 1 2025/9/24
3.0.37-dev-00040 1 2025/9/24
3.0.37-dev-00038 1 2025/9/24
3.0.36 0 2016/9/21
2.1.30 0 2016/8/23
2.0.22 0 2016/8/12
2.0.21 0 2016/8/12
2.0.13 1 2025/9/24
1.5.11 0 2015/6/15
1.5.8 0 2015/5/28
1.5.4 0 2015/4/2
1.5.3 0 2015/4/1
1.5.2 0 2015/3/30
1.5.1 0 2015/3/27
1.4.196 1 2025/9/24
1.4.182 0 2015/2/15
1.4.168 0 2015/2/8
1.4.155 1 2025/9/24
1.4.139 0 2015/1/23
1.4.118 0 2015/1/13
1.4.113 0 2015/1/6
1.4.102 0 2014/12/21
1.4.99 0 2014/12/18
1.4.97 0 2014/12/18
1.4.76 0 2014/12/8
1.4.39 0 2014/11/26
1.4.34 0 2014/11/24
1.4.28 0 2014/11/24
1.4.27 0 2014/11/23
1.4.23 1 2025/9/24
1.4.22 0 2014/11/21
1.4.21 0 2014/11/21
1.4.18 1 2025/9/24
1.4.15 0 2014/11/4
1.4.14 0 2014/10/23
1.4.13 0 2014/10/23
1.4.12 0 2014/10/12
1.4.11 0 2014/10/8
1.4.10 0 2014/9/26
1.4.9 0 2014/9/17
1.4.8 0 2014/9/11
1.4.7 0 2014/9/1
1.4.6 0 2014/8/31
1.4.5 0 2014/8/27
1.4.4 0 2014/8/27
1.4.3 0 2014/8/25
1.4.2 0 2014/8/23
1.4.1 0 2014/8/23
1.3.43 0 2014/8/4
1.3.42 0 2014/7/30
1.3.41 0 2014/7/28
1.3.40 0 2014/7/26
1.3.39 0 2014/7/25
1.3.37 0 2014/7/25
1.3.36 0 2014/7/20
1.3.35 0 2014/7/17
1.3.34 0 2014/7/6
1.3.33 0 2014/6/30
1.3.30 0 2014/6/19
1.3.29 0 2014/6/19
1.3.28 0 2014/6/19
1.3.27 0 2014/6/18
1.3.26 0 2014/6/18
1.3.25 0 2014/6/9
1.3.24 0 2014/5/21
1.3.23 0 2014/5/20
1.3.20 0 2014/5/18
1.3.19 0 2014/5/17
1.3.18 0 2014/5/17
1.3.17 0 2014/5/17
1.3.16 0 2014/5/17
1.3.15 0 2014/5/16
1.3.14 0 2014/5/16
1.3.13 0 2014/5/16
1.3.12 0 2014/5/14
1.3.7 0 2014/5/11
1.3.6 0 2014/5/9
1.3.5 0 2014/5/6
1.3.4 0 2014/5/4
1.3.3 0 2014/4/28
1.3.1 0 2014/4/26
1.2.53 0 2014/4/26
1.2.52 0 2014/4/24
1.2.51 0 2014/4/18
1.2.50 0 2014/4/18
1.2.49 0 2014/4/17
1.2.48 0 2014/4/14
1.2.47 0 2014/4/14
1.2.45 0 2014/4/13
1.2.44 0 2014/4/9
1.2.41 0 2014/4/7
1.2.40 0 2014/4/7
1.2.39 0 2014/3/29
1.2.37 0 2014/3/29
1.2.29 0 2014/3/16
1.2.27 0 2014/3/14
1.2.26 0 2014/3/12
1.2.25 0 2014/2/20