-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNLog.config
45 lines (37 loc) · 2.36 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
40
41
42
43
44
45
<?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"
throwExceptions="false"
internalLogLevel="Off" internalLogFile="c:\temp\Skyzi000\skyzibackup-nlog-internal.log">
<variable name="appname" value="SkyziBackup" />
<targets async="true">
<target name="logDebugger" xsi:type="Debugger" layout="${level:uppercase=true}|${logger}|${message}" />
<target name="logFile" xsi:type="File"
layout="${longdate}|${level:uppercase=true}|${message}${onexception:${literal:text=\: The method }'${exception:format=Method}' threw an ${exception:format=Type}.\: ${exception:format=Message}}"
header="${var:appname} ${assembly-version} LogFile"
footer="${var:appname} has been shut down."
fileName="${gdc:item=AppDataPath:whenEmpty=${specialfolder:folder=CommonApplicationData:cached=true}/Skyzi000/${var:appname}}/Logs/${var:appname}.log"
maxArchiveFiles="10"
archiveAboveSize="1073741824"
archiveNumbering="Date"
archiveEvery="Day"
keepFileOpen="true"
enableArchiveFileCompression="true" />
<target name="logErrorFile" xsi:type="File"
layout="${longdate}|${level:uppercase=true}|${callsite}|${message}${onexception:${literal:text=\: The method }'${exception:format=Method}' threw an ${exception:format=Type}.\: ${exception:format=ToString,method:maxInnerExceptionLevel=5:innerFormat=shortType,message,method}}"
header="${var:appname} ${assembly-version} ErrorLogFile"
footer="${var:appname} has been shut down."
fileName="${gdc:item=AppDataPath:whenEmpty=${specialfolder:folder=CommonApplicationData:cached=true}/Skyzi000/${var:appname}}/ErrorLogs/${var:appname}_Error.log"
maxArchiveFiles="10"
archiveAboveSize="1073741824"
archiveNumbering="Date"
archiveEvery="Day"
enableArchiveFileCompression="true" />
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="logDebugger" />
<logger name="*" minlevel="Info" writeTo="logFile" />
<logger name="*" minlevel="Error" writeTo="logErrorFile" />
</rules>
</nlog>