Selector/Selector.CLI/nlog.config

45 lines
1.8 KiB
Plaintext
Raw Normal View History

<?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"
2022-06-19 23:21:36 +01:00
internalLogFile="./log/selector.nlog.log"
internalLogLevel="Info" >
2022-07-01 22:04:17 +01:00
<variable name="scopeFormat"
value="${all-event-properties:format=[[key]\:[value]]:includeScopeProperties=true:separator= }"/>
<variable name="format"
2022-07-01 22:04:17 +01:00
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"
2022-06-19 23:21:36 +01:00
fileName="./log/selector-${shortdate}.log"
layout="${format}" />
<target xsi:type="File"
name="tracefile"
2022-06-19 23:21:36 +01:00
fileName="./log/selector.trace-${shortdate}.log"
layout="${format}" />
2022-07-01 22:04:17 +01:00
<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" />
2022-07-01 22:04:17 +01:00
<!--<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>