NLog.config
1.05 KB
<?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" internalLogFile="c:\temp\nlog-internal.log">
<variable name="myvar" value="myvalue"/>
<targets>
<!--add your targets here-->
<target xsi:type="File" name="info" fileName="${basedir}/logs/${shortdate}.log"
layout="${longdate} ${uppercase:${level}} ${message}" archiveEvery="Day" maxArchiveDays="15" />
<target xsi:type="File" name="error" fileName="${basedir}/logs/${shortdate}_error.log"
layout="${longdate} ${uppercase:${level}} ${message}" archiveEvery="Day" maxArchiveDays="15" />
</targets>
<rules>
<logger name="Microsoft.*" minlevel="Trace" final="true" />
<!-- add your logging rules here -->
<logger name="*" minlevel="Error" writeTo="error" />
<logger name="*" minlevel="Info" writeTo="info" />
</rules>
</nlog>