<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <!--nlog日志配置-->
  <configSections>
    <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
  </configSections>
  <!--NLog日志开源组件，请参照http://nlog-project.org/官方文档-->
  <appSettings>
    <add key="FirstStart" value="2026-05-08 16:27:21" />
  </appSettings>
  <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <!--设置文件异步写入，文件最大保存天数20天，单个日志文件最大5*1024*1024=5M,编码格式utf-8,支持多进程同时写入,日志目录"${basedir} | D:\Logs\yyyy.MM.dd.log"-->
    <targets async="true">
      <target name="debugger" xsi:type="Debugger" layout="${date:format=HH\:mm\:ss.fff}: ${message}"/>
      <target name="error_file" xsi:type="File" fileName="${basedir}\Logs\${shortdate}.log" archiveFileName="${basedir}\Logs\${shortdate}.{###}.log" keepFileOpen="true" archiveAboveSize="5242880" archiveNumbering="Sequence" encoding="utf-8" maxArchiveDays="7" maxArchiveFiles="8" concurrentWrites="true" cleanupFileName="false" layout="${date:format=HH\:mm\:ss\:fff} | ${level:uppercase=false} ${newline} ${message} ${onexception:${exception:format=tostring} ${newline} ${stacktrace} ${newline}"/>
    </targets>
    <rules>
      <logger name="*" minlevel="Debug" writeTo="debugger" />
      <logger name="*" minlevel="Info" writeTo="error_file" />
    </rules>
    </nlog>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    </startup>
</configuration>