This library does two things:
- All logged exceptions are reported to Coderr for further analysis
- Log entries from Serilog are cached so that the latest entries can be included with reported exceptions.
First, follow this guide.
Then activate this library:
class Program
{
static void Main(string[] args)
{
var url = new Uri("https://report.coderr.io/");
Err.Configuration.Credentials(url,
"yourAppKey",
"yourSharedSecret");
// serilog config
Log.Logger = new LoggerConfiguration()
.WriteTo.Console()
.WriteTo.Coderr() // This line activates coderr
.CreateLogger();
Log.Logger.Write(LogEventLevel.Information, "Hello World!");
// this exception will be reported to Coderr
Log.Logger.Write(LogEventLevel.Error, new Exception("My world"), "Hello World!");
}
}