73 lines
3.0 KiB
XML
73 lines
3.0 KiB
XML
<?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"
|
|
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
|
|
autoReload="true"
|
|
throwExceptions="false"
|
|
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
|
|
|
|
<!-- optional, add some variables
|
|
https://github.com/nlog/NLog/wiki/Configuration-file#variables
|
|
-->
|
|
<variable name="myvar" value="myvalue" />
|
|
|
|
<!--
|
|
See https://github.com/nlog/nlog/wiki/Configuration-file
|
|
for information on customizing logging rules and outputs.
|
|
-->
|
|
<targets>
|
|
|
|
<!--
|
|
add your targets here
|
|
See https://github.com/nlog/NLog/wiki/Targets for possible targets.
|
|
See https://github.com/nlog/NLog/wiki/Layout-Renderers for the possible layout renderers.
|
|
-->
|
|
|
|
<!--
|
|
Write events to a file with the date in the filename.
|
|
<target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
|
|
layout="${longdate} ${uppercase:${level}} ${message}" />
|
|
-->
|
|
<target xsi:type="File"
|
|
name="fileTarget"
|
|
fileName="${basedir}/logs/${shortdate}.log"
|
|
layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=false} | ${message}"
|
|
archiveFileName="${basedir}/logs/${shortdate}.{###}.zip"
|
|
archiveNumbering="Sequence"
|
|
archiveAboveSize="1024000"
|
|
maxArchiveFiles="90"
|
|
enableArchiveFileCompression="true"
|
|
keepFileOpen="false"
|
|
/>
|
|
<!--<target xsi:type="File"
|
|
name="fileDebug"
|
|
fileName="${basedir}/logs/${shortdate}_info.log"
|
|
layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=false} | ${message}"
|
|
archiveFileName="${basedir}/logs/${shortdate}.{###}.zip"
|
|
archiveNumbering="Sequence"
|
|
archiveAboveSize="1024000"
|
|
maxArchiveFiles="90"
|
|
enableArchiveFileCompression="true"
|
|
keepFileOpen="false"
|
|
/>-->
|
|
<target xsi:type="ColoredConsole"
|
|
name="consoleTarget"
|
|
layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=true}| ${message}" />
|
|
</targets>
|
|
|
|
<rules>
|
|
<!-- add your logging rules here -->
|
|
|
|
<!--
|
|
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
|
|
<logger name="*" minlevel="Debug" writeTo="f" />
|
|
-->
|
|
<!--<logger name="Microsoft.*" maxlevel="Info" final="true" />-->
|
|
<!--<logger name="*" minlevel="Trace" writeTo="consoleTarget" />-->
|
|
<!--<logger name="*" minlevel="Info" writeTo="fileTarget" />
|
|
|
|
|
|
<logger name="*" minlevel="Debug" maxlevel="Info" writeTo="fileDebug" />-->
|
|
<logger name="*" minlevel="Debug" writeTo="fileTarget" />
|
|
</rules>
|
|
</nlog> |