开发者

How can I define the location of NLog file in code?

开发者 https://www.devze.com 2023-03-20 07:11 出处:网络
Is there a way to define what config file NLog is suppos开发者_开发百科ed to use directly using c# code?You should be able to do something like this (note that I have neither compiled nor tested this)

Is there a way to define what config file NLog is suppos开发者_开发百科ed to use directly using c# code?


You should be able to do something like this (note that I have neither compiled nor tested this):

string path = GetThePathToYourNLogConfigFile();
LogManager.Configuration = new XmlLoggingConfiguration(path);
0

精彩评论

暂无评论...
验证码 换一张
取 消