45 lines
1.8 KiB
XML
45 lines
1.8 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<!-- XSD manual extracted from package NLog.Schema: https://www.nuget.org/packages/NLog.Schema-->
|
|
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xsi:schemaLocation="NLog NLog.xsd"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
autoReload="true"
|
|
throwConfigExceptions="true"
|
|
internalLogFile="./log/selector.nlog.log"
|
|
internalLogLevel="Info" >
|
|
|
|
<variable name="scopeFormat"
|
|
value="${all-event-properties:format=[[key]\:[value]]:includeScopeProperties=true:separator= }"/>
|
|
|
|
<variable name="format"
|
|
value="${longdate}|${level:uppercase=true}|${callsite}:${callsite-linenumber}|${message}${onexception:inner=${newline}}${exception:format=tostring,data:exceptionDataSeparator=\r\n}${newline} ${scopeFormat}"/>
|
|
|
|
<!-- the targets to write to -->
|
|
<targets>
|
|
<!-- write logs to file -->
|
|
<target xsi:type="File"
|
|
name="logfile"
|
|
fileName="./log/selector-${shortdate}.log"
|
|
layout="${format}" />
|
|
<target xsi:type="File"
|
|
name="tracefile"
|
|
fileName="./log/selector.trace-${shortdate}.log"
|
|
layout="${format}" />
|
|
<target xsi:type="ColoredConsole"
|
|
name="logconsole"
|
|
layout="${format}" />
|
|
</targets>
|
|
|
|
<!-- rules to map from logger name to target -->
|
|
<rules>
|
|
<logger name="Selector.*" minlevel="Debug" writeTo="logconsole" />
|
|
<logger name="Microsoft.*" minlevel="Warning" writeTo="logconsole" />
|
|
|
|
<!--<logger name="*" minlevel="Debug" writeTo="logfile" />-->
|
|
<logger name="Selector.*" minlevel="Debug" writeTo="logfile" />
|
|
<logger name="Microsoft.*" minlevel="Warning" writeTo="logfile" />
|
|
|
|
<!--<logger name="*" minlevel="Trace" writeTo="tracefile" />-->
|
|
<logger name="Selector.*" minlevel="Debug" writeTo="tracefile" />
|
|
<logger name="Microsoft.*" minlevel="Warning" writeTo="tracefile" />
|
|
</rules>
|
|
</nlog> |