好的,我正在尝试在我的项目中实现 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}
属性,我没有得到任何日志。根据他们的文档,longdate
并且time
两者都应该是有效的。我错过了什么吗?它们实际上不是有效的fileName
吗?