29 lines
1.5 KiB
Text
29 lines
1.5 KiB
Text
|
<?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>
|
||
|
<target name="coloredConsole" xsi:type="ColoredConsole" useDefaultRowHighlightingRules="false"
|
||
|
layout="${date:format=HH\:mm\:ss} [${level:uppercase=true}] ${logger:shortName=true}: ${message}" >
|
||
|
<highlight-row condition="level == LogLevel.Debug" foregroundColor="DarkGray" />
|
||
|
<highlight-row condition="level == LogLevel.Info" foregroundColor="Blue" />
|
||
|
<highlight-row condition="level == LogLevel.Warn" foregroundColor="Yellow" />
|
||
|
<highlight-row condition="level == LogLevel.Error" foregroundColor="Red" />
|
||
|
<highlight-row condition="level == LogLevel.Fatal" foregroundColor="Red" backgroundColor="White" />
|
||
|
</target>
|
||
|
|
||
|
<target name="infoFile" xsi:type="File"
|
||
|
layout="${longdate} ${pad:padding=5:inner=${level:uppercase=true}} ${logger} ${message}"
|
||
|
fileName="${basedir}/logs/info.log" keepFileOpen="false" encoding="iso-8859-2" />
|
||
|
<target name="errorFile" xsi:type="File"
|
||
|
layout="${longdate} ${pad:padding=5:inner=${level:uppercase=true}} ${logger} ${message}"
|
||
|
fileName="${basedir}/logs/error.log" keepFileOpen="false" encoding="iso-8859-2" />
|
||
|
</targets>
|
||
|
|
||
|
<rules>
|
||
|
<logger name="*" minlevel="Debug" writeTo="coloredConsole" />
|
||
|
|
||
|
<logger name="*" minlevel="Debug" maxlevel="Info" writeTo="infoFile" />
|
||
|
<logger name="*" minlevel="Warn" maxlevel="Fatal" writeTo="errorFile" />
|
||
|
</rules>
|
||
|
</nlog>
|