【发布时间】:2013-01-09 16:36:35
【问题描述】:
好的,我正在尝试在我的项目中实现 NLog,并且我已经设定了一个目标:
<target name="logfile" xsi:type="File" fileName="${basedir}/logs/${shortdate}/Report/log.txt" />
这可以工作并输出我的测试日志。但是,如果我将shortdate 更改为longdate:
<target name="logfile" xsi:type="File" fileName="${basedir}/logs/${longdate}/Report/log.txt" />
或者使用${time} 属性,我没有得到任何日志。根据他们的documentation、longdate 和time 应该都是有效的。我错过了什么吗?它们实际上对fileName 无效吗?
【问题讨论】: