1 <?xml version="1.0" encoding="utf-8"?> 2 <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 4 autoReload="true" internalLogLevel="Warn" internalLogFile="logs/internalLog.log"> 5 <variable name="logDirectory" value="${basedir}/logs/${shortdate}"/> 6 <targets async="true"> 7 <default-target-parameters 8 xsi:type="File" 9 keepFileOpen="true" 10 encoding="Utf-8" 11 archiveAboveSize="10240000" 12 archiveDateFormat="yyyyMMddHH" 13 archiveNumbering="DateAndSequence" 14 layout="${longdate}|${level:uppercase=false:padding=-5}|${callsite}:${callsite-linenumber}|${message} ${onexception:${exception:format=tostring}${newline}${newline}}" 15 /> 16 <default-target-parameters 17 xsi:type="ColoredConsole" 18 detectConsoleAvailable="true" 19 layout="${longdate}|${level:uppercase=false:padding=-5}|${callsite}:${callsite-linenumber}|${message} ${onexception:${exception:format=tostring}${newline}${newline}}" 20 /> 21 <target name="console" xsi:type="ColoredConsole"/> 22 <target name="default" xsi:type="File" 23 fileName="${logDirectory}_default.log" 24 archiveFileName="${logDirectory}/default_{#}.log" 25 /> 26 </targets> 27 <rules> 28 <logger name="*" maxlevel="Debug" writeTo="default,console" > 29 <filters> 30 <when condition="!contains('CN-L-6683748,CN-S-VDNET40','${machinename}')" action="Ignore" /> 31 </filters> 32 </logger> 33 <logger name="*" minlevel="Info" writeTo="default,console"/> 34 <!--<logger name="*" writeTo="console"/>--> 35 </rules> 36 </nlog>