简体   繁体   English

如何将值设置为 NLog.config

[英]How to set value to NLog.config

I am just wondering how to change the value in NLog.config file from other file configuration for example,我只是想知道如何从其他文件配置中更改NLog.config文件中的值,例如,

<variable name="logDirectory" value="${basedir}/logs/${shortdate}"/>

I want to change logDirectory value to be "C:/logs/${shortdate}" and of course I want to get the value from other configuration file.我想将 logDirectory 值更改为“C:/logs/${shortdate}”,当然我想从其他配置文件中获取值。 Is it possible to do that?有可能这样做吗?

thanks in advance.提前致谢。

You can use configSource="YourConfigFile"您可以使用 configSource="YourConfigFile"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM