Database Reference
In-Depth Information
Logging
In this example, we also have to set the app.config file to use NLog. NServiceBus will
support the common logging frameworks, common logging, NLog, Log4Net, and Serilog.
Refer to http://docs.particular.net/NServiceBus/logging-in-nservicebus for more informa-
tion.
For NLog, we need to add the Nlog Nuget reference to the project.
We need to set the logging levels and the location of where the logs are being sent to in the
app.config file.
The app.config file is set using Nlog in the same way like most applications do, the
difference being that there needs to be a section name for NServiceBus to use Nlog, for ex-
ample, <section name="nlog"
type="NLog.Config.ConfigSectionHandler, NLog" /> ; for a tutorial on
NLog, please see https://github.com/nlog/nlog/wiki/Tutorial . We also set the local configur-
ation using SetLoggingLibrary.NLog(); .
Search WWH ::




Custom Search