-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnlog.config
27 lines (27 loc) · 1.75 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
<?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" internalLogLevel="Debug"
internalLogFile="c:\temp\nlog-internal.txt"
internalLogToConsole="true"
throwConfigExceptions="true">
<targets>
<target xsi:type="File" name="FileTarget" fileName="${basedir}/Logs/${shortdate}.log">
<layout xsi:type="LayoutWithHeaderAndFooter">
<layout xsi:type="SimpleLayout" text="${longdate} [${level:uppercase=true}] ${callsite:className=true:includeNamespace=False:methodName=true}(): ${message}${exception:format=tostring}"/>
<header xsi:type="SimpleLayout" text="================================================================================================================"/>
<footer xsi:type="SimpleLayout" text="${newline}================================================================================================================${newline}"/>
</layout>
</target>
<target xsi:type="ColoredConsole" name="Console">
<layout xsi:type="LayoutWithHeaderAndFooter">
<layout xsi:type="SimpleLayout" text="${longdate} [${level:uppercase=true}] ${message}${exception:format=tostring}"/>
<header xsi:type="SimpleLayout" text="================================================================================================================"/>
<footer xsi:type="SimpleLayout" text="================================================================================================================${newline}"/>
</layout>
</target>
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="FileTarget" />
<logger name="*" minlevel="Debug" writeTo="Console" />
</rules>
</nlog>