整体调整了功能

This commit is contained in:
2026-01-13 15:03:02 +08:00
parent 63a768bd80
commit f1a892281b
82 changed files with 11226 additions and 291 deletions

View File

@@ -1,16 +1,53 @@
<?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"
internalLogLevel="Warn">
<targets>
<target xsi:type="File" name="file" fileName="${basedir}/logs/${shortdate}.log"
layout="${longdate} | ${level:uppercase=true} | ${logger} | ${message} ${exception:format=ToString}" />
<target xsi:type="Console" name="console"
layout="${longdate} | ${level:uppercase=true} | ${logger} | ${message} ${exception:format=ToString}" />
</targets>
throwExceptions="false"
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
<rules>
<logger name="*" minlevel="Info" writeTo="file,console" />
</rules>
<!-- optional, add some variables
https://github.com/nlog/NLog/wiki/Configuration-file#variables
-->
<variable name="logDirectory" value="${basedir}/Log/${shortdate}"/>
<variable name="ActionDirectory" value="${basedir}/OperationLogs/${shortdate}"/>
<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="FATraceApp" fileName="${logDirectory}/ErrorMessage.txt" maxArchiveDays="60" archiveAboveSize="10240000" maxArchiveFiles="200"
layout="${longdate} ■${level}${newline} ▲${stacktrace}${newline} ◆${message}${newline}${newline}***************************************************************************" />
<target xsi:type="File" name="FATraceAppOperation" fileName="${ActionDirectory}/OperationLog.txt" maxArchiveDays="60" archiveAboveSize="10240000" maxArchiveFiles="500"
layout="${longdate} ■${level}${newline} ◆${message}${newline}***************************************************************************" />
</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="*" minlevel="Error" writeTo="FATraceApp" />
<logger name="*" minlevel="Info" maxlevel="Info" writeTo="FATraceAppOperation" />
</rules>
</nlog>