Skip to content

rebus-org/Rebus.NLog

Repository files navigation

Rebus.NLog

install from nuget

Provides an NLog logger integration for Rebus.

How to use it

When you configure Rebus by calling the ordinary configuration spell

Configure.With(yourFavoriteContainerAdapter)
	.Transport(t => t.UseYourFavoriteTransport("with-this-queue"))
	.Start();

Rebus will default to log things to the console, using colors to differentiate between the four different log levels used.

You can make Rebus use NLog like this:

Configure.With(yourFavoriteContainerAdapter)
	.Logging(l => l.NLog())
	.Transport(t => t.UseYourFavoriteTransport("with-this-queue"))
	.Start();

and that's basically it :)

Please check out the NLog site for details on how to configure NLog.