Skip to content

elmahio/serilog-sinks-elmahio

Repository files navigation

Serilog.Sinks.ElmahIo

A Serilog sink that writes events to elmah.io.

Build status NuGet Version

To configure the elmah.io sink, call the ElmahIo method as part of your log configuration:

var log = new LoggerConfiguration()
    .WriteTo.ElmahIo(new ElmahIoSinkOptions("API_KEY", new Guid("LOG_ID")))
    .CreateLogger();

The sink captures all levels, but respect the minimum level configured on LoggerConfiguration. Serilog properties are converted to elmah.io's concept of custom variables, when logging new events.

Documentation