pardahlman / RawRabbit

A modern .NET framework for communication over RabbitMq
MIT License
747 stars 144 forks source link

Provide Serilog Logger in Ctor #104

Closed pardahlman closed 8 years ago

pardahlman commented 8 years ago

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());
);