Closed SinoMiles closed 5 years ago
Loading from configuration works
LoggerConfiguration loggerConfiguration = new LoggerConfiguration();
IConfigurationSection rabbitMqSection = configuration.GetSection("log:rabbitMq");
loggerConfiguration = loggerConfiguration
.WriteTo.RabbitMQ((clientConfiguration, sinkConfiguration) =>
{
rabbitMqSection.Bind(clientConfiguration);
sinkConfiguration.RestrictedToMinimumLevel = LogEventLevel.Warning;
});
If you are configuring manually, then use Hostnames.Add
Hi, thank you for pointing this out. The configuration API in v3 has changed. I will update the readme.md later today . Until then maybe you can use the examples from this PR to set up the sink.
.