NLog.config
1020 Bytes
<?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>
<target name="logInfo" xsi:type="File" fileName="D:/HHLog/ECSLog/Info_${shortdate}.txt" layout="${longdate}|${level:uppercase=true}|${logger}|${threadid}|${message}|${exception:format=tostring}" encoding="utf-8"/>
<target name="logFatal" xsi:type="File" fileName="D:/HHLog/ECSLog/Exception_${shortdate}.txt" layout="${longdate}|${level:uppercase=true}|${logger}|${threadid}|${message}|${exception:format=tostring}" encoding="utf-8" />
</targets>
<rules>
<logger name="*" minlevel="Info" maxlevel="Error" writeTo="logInfo" />
<logger name="*" level="Fatal" writeTo="logFatal" />
</rules>
</nlog>