You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.0 KiB
XML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?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"
keepVariablesOnReload="true"
throwExceptions="false"
throwConfigExceptions="true"
internalLogToConsoleError="true"
internalLogLevel="Warn"
internalLogFile="${basedir}\Logs\internal-nlog.txt">
<!-- enable asp.net core layout renderers -->
<extensions>
</extensions>
<!-- the targets to write to -->
<targets>
<!--设置缓存日志-->
<!--
<default-wrapper xsi:type="BufferingWrapper" bufferSize="10"/>
-->
<!-- 所有日志 Target -->
<target xsi:type="File"
name="allfile"
fileName="${basedir}\Logs\nlog-all-${shortdate}.log"
layout="${longdate}|${event-properties:item=EventId_Id}|${uppercase:${level}}|${logger}|${message} ${exception:format=tostring}" />
<!-- 控制台 Target -->
<target xsi:type="ColoredConsole"
name="ColoredConsoleTarget"
layout="${longdate} ${uppercase:${level}} ${message} ${exception:format=tostring}" />
<!-- Quartz.Net Target -->
<target xsi:type="File"
name="QuartzNetTarget"
fileName="${basedir}\Logs\nlog-quartz-${shortdate}.log"
layout="${longdate} ${uppercase:${level}} ${message} ${exception:format=tostring}" />
</targets>
<!-- 规则到目标映射 -->
<rules>
<!--所有日志包括Microsoft框架-->
<logger name="*" minlevel="Trace" writeTo="allfile" />
<!--跳过非关键的Microsoft日志因此只记录Microsoft日志-->
<logger name="Microsoft.*" maxlevel="Info" final="true" />
<!--所有日志,控制台-->
<logger name="*" minlevel="Info" writeTo="ColoredConsoleTarget" />
<!-- Quartzj日志 -->
<logger name="Quartz.*" minlevel="Info" writeTo="QuartzNetTarget" />
</rules>
</nlog>