【发布时间】:2011-10-04 19:48:24
【问题描述】:
有没有办法使用 c# 代码定义 NLog 应该直接使用的配置文件?
【问题讨论】:
标签: logging configuration nlog
有没有办法使用 c# 代码定义 NLog 应该直接使用的配置文件?
【问题讨论】:
标签: logging configuration nlog
你应该可以做这样的事情(注意我没有编译也没有测试过):
string path = GetThePathToYourNLogConfigFile();
LogManager.Configuration = new XmlLoggingConfiguration(path);
【讨论】: