【发布时间】:2018-02-28 11:23:09
【问题描述】:
我有 NLog 包的 Logger, 我想在我的配置记录器文件中定义 trace enable=true。
我该怎么做?
我的 NLog.config 文件:
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="logfile" xsi:type="File" fileName="file.txt" />
<target name="logconsole" xsi:type="Console" />
</targets>
<rules>
<logger name="*" maxlevel="Trace" minlevel="Trace" writeTo="logfile" />
</rules>
</nlog>
【问题讨论】:
标签: c# configuration nlog