Skip to content

rebus-org/Rebus.Microsoft.Extensions.Logging

Repository files navigation

Rebus.Microsoft.Extensions.Logging

install from nuget

Provides a Microsoft Extensions Logging logging integration for Rebus.


Like this:

var loggerFactory = new LoggerFactory()
	.AddConsole();

Configure.With(...)
	.Logging(l => l.MicrosoftExtensionsLogging(loggerFactory))
	.Transport(t => t.Use(...))
	.(...)
	.Start();

or like this:

var logger = new LoggerFactory()
	.AddConsole()
	.CreateLogger<Program>();

Configure.With(...)
	.Logging(l => l.MicrosoftExtensionsLogging(logger))
	.Transport(t => t.Use(...))
	.(...)
	.Start();