Because I use Azure DevOps my deployment and I have 3 environments (dev, staging, prod). Each of them use really specific NLog definition.
I would like to create 3 NLog file Nlog.dev.config, NLog.staging.config and NLog.prod.config and tell NLog which one to use. I can also simply save Nlog in a folder that is not overridden by the deployment tool. Whatever, I need to specify the path of my config file.
https://github.com/nlog/NLog/wiki/Configuration-file
Loading NLog configuration from file NLog will automatically scan for configuration files, but sometimes the platform requires explicit configuration loading like this:
NLog.LogManager.Configuration = new NLog.Config.XmlLoggingConfiguration("nlog.config");
Thank you Joe
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With