-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathNLog.config
More file actions
47 lines (41 loc) · 1.9 KB
/
NLog.config
File metadata and controls
47 lines (41 loc) · 1.9 KB
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
40
41
42
43
44
45
46
47
<?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"
autoReload="true"
internalLogLevel="Info"
internalLogFile="${specialfolder:folder=ApplicationData}/DisplayProfileManager/Logs/nlog-internal.log">
<!-- Define log file variables -->
<variable name="logDirectory" value="${specialfolder:folder=ApplicationData}/DisplayProfileManager/Logs"/>
<!-- Define targets -->
<targets>
<!-- File target for all logs -->
<target xsi:type="File"
name="logfile"
fileName="${logDirectory}/DisplayProfileManager-${shortdate}.log"
layout="${longdate}|${level:uppercase=true}|${logger}|${message}${onexception:${newline}${exception:format=tostring}}"
archiveFileName="${logDirectory}/archives/DisplayProfileManager-{#}.log"
archiveEvery="Day"
archiveNumbering="Date"
archiveDateFormat="yyyy-MM-dd"
maxArchiveFiles="30"
concurrentWrites="true"
keepFileOpen="false"
encoding="utf-8" />
<!-- Console target for debug output -->
<target xsi:type="Console"
name="console"
layout="${time}|${level:uppercase=true}|${logger:shortName=true}|${message}${onexception:${newline}${exception:format=message}}" />
<!-- Colored console target -->
<target xsi:type="ColoredConsole"
name="coloredConsole"
layout="${time}|${level:uppercase=true}|${logger:shortName=true}|${message}${onexception:${newline}${exception:format=message}}"
useDefaultRowHighlightingRules="true" />
</targets>
<!-- Define rules -->
<rules>
<!-- All logs to file -->
<logger name="*" minlevel="Trace" writeTo="logfile" />
<!-- All logs to console -->
<logger name="*" minlevel="Trace" writeTo="coloredConsole" />
</rules>
</nlog>