In addition to the createFn to create a Serilog logger, the LoggerFactory for Serilog should have a constructor that takes a Serilog.ILogger as argument. This opens up for registration of rawrabbit specific logger etc, for example
.AddSingleton<ILoggerFactory>(c =>
new RawRabbit.Logging.Serilog.LoggerFactory(new LoggerConfiguration()
.ReadFrom.AppSettings("rawrabbit")
.CreateLogger());
);
In addition to the
createFn
to create a Serilog logger, theLoggerFactory
for Serilog should have a constructor that takes aSerilog.ILogger
as argument. This opens up for registration of rawrabbit specific logger etc, for example