NServiceBus icon indicating copy to clipboard operation
NServiceBus copied to clipboard

Internalized NLog interferes with external NLog

Open johannesg opened this issue 14 years ago • 1 comments

NLog is internalized into NSB because RavenDB is dependent on it. NLog will automatically configure itself if there is a nlog.config file present in the application directory. If I want to configure NLog myself by having a nlog.config this means that the internalized nlog will also configure itself using this file. The effect will be 2 instances of NLog that writes to the same targets which is not very good if you for example have rolling file targets with exclusive lock.

The solution is to override the internalized NLog configuration and have it either going to a null target or maybe creating a bridge to NSB.Logging (NSB4) or log4net (NSB3). The latter could be useful if you want to troubleshoot ravendb issues.

johannesg avatar Sep 18 '12 09:09 johannesg

Closing: NLog is no longer internalized into NSB

SimonCropp avatar Jul 15 '13 05:07 SimonCropp