I develop a web application using NLog logger. I want to have different logger configurations for the testing environment and the production environment
Is there a best practice as to how to set the configuration for the NLog logger using existing Xml file?
I want to have a configurable logger both in my test environment and in the production development.
In production environment I make a call in the highest point of the first method fired to
LogManager.Configuration = new XmlLoggingConfiguration(productionPath);
In my test environment , I execute this in the assembly initialize methods:
LogManager.Configuration = new XmlLoggingConfiguration(testingPath);
Is there a better way to configure my logger dynamically somehow?