-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNLog.config
34 lines (30 loc) · 1.38 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
<?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="true"
internalLogLevel="Off" internalLogFile="./logs/nlog_internal.log">
<targets>
<!-- ファイル -->
<target name="logFile"
xsi:type="File"
encoding="UTF-8"
writeBom="true"
lineEnding="Default"
layout="${longdate} ${level:uppercase=true:padding=-5} [${threadid}] ${logger} - ${message} ${exception:format=tostring}"
fileName="./logs/${processname}_${date:format=yyyy-MM-dd}.log"
maxArchiveFiles="7" />
<!--archiveFileName="./logs/backup/${processname}_{###}.log"-->
<!--archiveEvery="Day"-->
<!--archiveNumbering="Sequence"-->
<!-- Console -->
<!--<target name="console" xsi:type="ColoredConsole" layout="${longdate} ${level:uppercase=true:padding=-5} ${message}" />-->
<!-- Viewer(Log2Console, etc...) -->
<!--<target name="tcpOutlet" xsi:type="NLogViewer" address="tcp4://localhost:4505"/>-->
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="logFile" />
<!--<logger name="*" minlevel="Trace" writeTo="console" />-->
<!--<logger name="*" minlevel="Trace" writeTo="tcpOutlet" />-->
</rules>
</nlog>