elmahio / serilog-sinks-elmahio

A Serilog sink that writes events to elmah.io

Home Page:https://elmah.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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