1. 程式人生 > >nlog配置文件

nlog配置文件

level tar sage mes ets nbsp exceptio mls evel

文件名 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 async="true" maxarchivefiles="2">
<target name="log_file" xsi:type="File" fileName="${basedir}/logs/${date:format=yyyyMMdd}.log"
layout="[============================${newline}${date} ${appdomain} ${logger} ${level}${newline}${message}${newline}${exception}]"/>
</targets>
<rules>
<logger name="*" minlevel="trace" writeTo="log_file"></logger>
</rules>
</nlog>

nlog配置文件