Serilog.Sinks.ILogger
Serilog sink that writes to a Microsoft ILogger
Install / Use
/learn @tinybluerobots/Serilog.Sinks.ILoggerREADME
Serilog.Sinks.ILogger
Writes Serilog events to a Microsoft.Extensions.Logging.ILogger.
Getting started
Install the Serilog.Sinks.ILogger package from NuGet:
Install-Package Serilog.Sinks.ILogger
To configure the sink in C# code, call WriteTo.ILogger() during logger configuration:
var log = new LoggerConfiguration()
.WriteTo.ILogger(logger)
.CreateLogger();
logger The ILogger.
Optional parameters
outputTemplate A message template describing the output messages. See https://github.com/serilog/serilog/wiki/Formatting-Output.
restrictedToMinimumLevel The minimum level for events passed through the sink.
