-
Notifications
You must be signed in to change notification settings - Fork 0
/
NLog.config
39 lines (39 loc) · 2.25 KB
/
NLog.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?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">
<targets>
<target layout="${longdate}|${pad:padding=5:inner=${level:uppercase=true}}|${callsite:includeNamespace=false} ${message}${onexception:${newline}${exception:format=tostring}}"
name="logfile" xsi:type="File" fileName="${processname:fullName=false}.log" deleteOldFileOnStartup="true" />
<target layout="${longdate}|${pad:padding=5:inner=${level:uppercase=true}}|${callsite:includeNamespace=false} ${message}${onexception:${newline}${exception:format=tostring}}"
name="logfile_trace" xsi:type="File" fileName="${processname:fullName=false}_trace.log" deleteOldFileOnStartup="true" />
<target xsi:type="ColoredConsole"
name="console"
encoding="utf-8"
layout="${time} | ${pad:padding=5:inner=${level:uppercase=true}} | ${message}"
detectConsoleAvailable="false">
<highlight-row condition="level == LogLevel.Trace" foregroundColor="Gray" />
<highlight-row condition="level == LogLevel.Debug" foregroundColor="Cyan" />
<highlight-row condition="level == LogLevel.Info" foregroundColor="White" />
<highlight-row condition="level == LogLevel.Warn" foregroundColor="Yellow" />
<highlight-row condition="level == LogLevel.Error" foregroundColor="Red" />
<highlight-row condition="level == LogLevel.Fatal" foregroundColor="Black" backgroundColor="Red" />
</target>
<target xsi:type="FormControl"
name="statusbar"
layout="${time} | ${pad:padding=5:inner=${level:uppercase=true}} | ${message}"
append="False"
reverseOrder="False"
controlName="status_text"
formName="Main" />
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="logfile_trace" />
<logger name="*" minlevel="Debug" writeTo="logfile" />
<logger name="*" minlevel="Debug" writeTo="console" />
<logger name="*" minlevel="Info" writeTo="statusbar" />
</rules>
</nlog>