<?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"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true" throwExceptions="false" internalLogLevel="Off">
<variable name="logDirectory" value="${basedir}/logs/${date:format=yyyyMM}"/>
<variable name="newLine" value="\r\n"/>
<targets async="true" keepFileOpen="false">
<!-- to limit per file max size: archiveAboveSize="5000000" -->
<default-target-parameters xsi:type="File" layout="${message}" encoding="utf-8" />
<target name="MinTarget" xsi:type="File" fileName="${logDirectory}/All/${date:format=yyyyMMddHH}.txt" />
<target name="LogCustom" xsi:type="File"
fileName="${logDirectory}\${event-context:DirOrPrefix}${date:format=yyyyMMddHH}.txt"/>
</targets>
<rules>
<logger name="*" minlevel="Debug" maxlevel="Fatal" writeTo="MinTarget" />
<logger name="LogCustom" level="Trace" writeTo="LogCustom" />
</rules>
</nlog>
已邀请: