NServiceBus can be configured for logging with log4net. It is also a good practice to keep your logging configuration in a separate file.
In your [web | app].config file add the following lines:
In your service bus bootstrap code simply add Log4Net() extension method:
That’s it! Remember you can control the logging level within the configuration file also by specifying the namespace and the logging level.
The following configures the NServiceBus.Utils and NServiceBus.Unicast to log only INFO levels: