asg_backend/asg_form/nlog.config

28 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-08-03 20:40:34 +08:00
<?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">
<!--输出目标,往哪里输出-->
<targets>
<!--type:日志输出类型 File:文件 ColoredConsole:控制台-->
<!--fileName:日志存储的路径及名称-->
<!--layout:日志输出格式-->
<target name="log_file" xsi:type="File"
fileName="${basedir}/Logs/${shortdate}/${shortdate}.txt"
layout="${longdate} | ${event-properties:item=EventId_Id:whenEmpty=0} | ${uppercase:${level}} | ${logger} | ${message} ${exception:format=tostring}"
archiveFileName="${basedir}/archives/${shortdate}-{#####}.txt"
archiveAboveSize="102400"
archiveNumbering="Sequence"
concurrentWrites="true"
keepFileOpen="false" />
<!--<target name="console" xsi:type="ColoredConsole" layout="[${date:format=HH\:mm\:ss}]:${message} ${exception:format=message}" />-->
</targets>
<!--定义使用哪个target输出-->
<rules>
<logger name="*" minlevel="Trace" writeTo="log_file" />
<!--<logger name="*" minlevel="Debug" writeTo="console" />-->
</rules>
</nlog>