dc/App.config

192 righe
8.9 KiB
Plaintext

2022-04-01 17:03:54 +08:00
<?xml version="1.0" encoding="utf-8"?>
<configuration>
2022-12-16 13:01:24 +08:00
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
2022-04-01 17:03:54 +08:00
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>
2022-12-16 13:01:24 +08:00
<log4net>
<root>
</root>
<logger name="SYSLogger">
<level value="ALL" />
<appender-ref ref="SYSLoggerDebug" />
<appender-ref ref="SYSLoggerInfo" />
<appender-ref ref="SYSLoggerError" />
</logger>
<logger name="SECSLogger">
<level value="ALL" />
<appender-ref ref="SECSLoggerDebug" />
<appender-ref ref="SECSLoggerInfo" />
<appender-ref ref="SECSLoggerError" />
</logger>
<logger name="MQLogger">
<level value="ALL" />
<appender-ref ref="MQLoggerDebug" />
<appender-ref ref="MQLoggerInfo" />
<appender-ref ref="MQLoggerError" />
</logger>
<appender name="SYSLoggerDebug" type="log4net.Appender.RollingFileAppender">
<!--定义文件存放位置-->
2023-02-23 11:33:23 +08:00
<param name="File" value="logs/SYSTEM/DEBUG/" />
2022-12-16 13:01:24 +08:00
<!--是否追加到文件-->
2023-02-23 11:33:23 +08:00
<param name="AppendToFile" value="true" />
2022-12-16 13:01:24 +08:00
<!--最多产生的日志文件数超过则只保留最新的n个。设定值value="1"为不限文件数-->
2023-02-23 11:33:23 +08:00
<param name="MaxSizeRollBackups" value="-1" />
2022-12-16 13:01:24 +08:00
<!--是否只写到一个文件中-->
2023-02-23 11:33:23 +08:00
<param name="StaticLogFileName" value="false" />
2022-12-16 13:01:24 +08:00
<!--按日期划分文件夹和命名文件名-->
2023-02-23 11:33:23 +08:00
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;" />
2022-12-16 13:01:24 +08:00
<!--按照何种方式产生多个日志文件(日期[Date],文件大小[Size],混合[Composite])-->
2023-02-23 11:33:23 +08:00
<param name="RollingStyle" value="Date" />
2022-12-16 13:01:24 +08:00
<!--输出格式-样例-->
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<!--记录日志写入文件时不锁定文本文件防止多线程时不能写Log,官方说线程非安全-->
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="Debug" />
<param name="LevelMax" value="Debug" />
</filter>
</appender>
<appender name="SYSLoggerError" type="log4net.Appender.RollingFileAppender">
2023-02-23 11:33:23 +08:00
<param name="File" value="logs/SYSTEM/ERROR/" />
<param name="AppendToFile" value="true" />
<param name="MaxSizeRollBackups" value="-1" />
<param name="StaticLogFileName" value="false" />
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;" />
<param name="RollingStyle" value="Date" />
2022-12-16 13:01:24 +08:00
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ERROR" />
<param name="LevelMax" value="ERROR" />
</filter>
</appender>
<appender name="SYSLoggerInfo" type="log4net.Appender.RollingFileAppender">
2023-02-23 11:33:23 +08:00
<param name="File" value="logs/SYSTEM/INFO/" />
<param name="AppendToFile" value="true" />
<param name="MaxSizeRollBackups" value="-1" />
<param name="StaticLogFileName" value="false" />
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;" />
<param name="RollingStyle" value="Date" />
2022-12-16 13:01:24 +08:00
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="INFO" />
<param name="LevelMax" value="INFO" />
</filter>
</appender>
<appender name="SECSLoggerDebug" type="log4net.Appender.RollingFileAppender">
2023-02-23 11:33:23 +08:00
<param name="File" value="logs/SECS/DEBUG/" />
<param name="AppendToFile" value="true" />
<param name="MaxSizeRollBackups" value="-1" />
<param name="StaticLogFileName" value="false" />
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;" />
<param name="RollingStyle" value="Date" />
2022-12-16 13:01:24 +08:00
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="Debug" />
<param name="LevelMax" value="Debug" />
</filter>
</appender>
<appender name="SECSLoggerError" type="log4net.Appender.RollingFileAppender">
2023-02-23 11:33:23 +08:00
<param name="File" value="logs/SECS/ERROR/" />
<param name="AppendToFile" value="true" />
<param name="MaxSizeRollBackups" value="-1" />
<param name="StaticLogFileName" value="false" />
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;" />
<param name="RollingStyle" value="Date" />
2022-12-16 13:01:24 +08:00
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ERROR" />
<param name="LevelMax" value="ERROR" />
</filter>
</appender>
<appender name="SECSLoggerInfo" type="log4net.Appender.RollingFileAppender">
2023-02-23 11:33:23 +08:00
<param name="File" value="logs/SECS/INFO/" />
<param name="AppendToFile" value="true" />
<param name="MaxSizeRollBackups" value="-1" />
<param name="StaticLogFileName" value="false" />
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;" />
<param name="RollingStyle" value="Date" />
2022-12-16 13:01:24 +08:00
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="INFO" />
<param name="LevelMax" value="INFO" />
</filter>
</appender>
<appender name="MQLoggerDebug" type="log4net.Appender.RollingFileAppender">
2023-02-23 11:33:23 +08:00
<param name="File" value="logs/MQ/DEBUG/" />
<param name="AppendToFile" value="true" />
<param name="MaxSizeRollBackups" value="-1" />
<param name="StaticLogFileName" value="false" />
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;" />
<param name="RollingStyle" value="Date" />
2022-12-16 13:01:24 +08:00
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="Debug" />
<param name="LevelMax" value="Debug" />
</filter>
</appender>
<appender name="MQLoggerError" type="log4net.Appender.RollingFileAppender">
2023-02-23 11:33:23 +08:00
<param name="File" value="logs/MQ/ERROR/" />
<param name="AppendToFile" value="true" />
<param name="MaxSizeRollBackups" value="-1" />
<param name="StaticLogFileName" value="false" />
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;" />
<param name="RollingStyle" value="Date" />
2022-12-16 13:01:24 +08:00
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ERROR" />
<param name="LevelMax" value="ERROR" />
</filter>
</appender>
<appender name="MQLoggerInfo" type="log4net.Appender.RollingFileAppender">
2023-02-23 11:33:23 +08:00
<param name="File" value="logs/MQ/INFO/" />
<param name="AppendToFile" value="true" />
<param name="MaxSizeRollBackups" value="-1" />
<param name="StaticLogFileName" value="false" />
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;" />
<param name="RollingStyle" value="Date" />
2022-12-16 13:01:24 +08:00
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="INFO" />
<param name="LevelMax" value="INFO" />
</filter>
</appender>
</log4net>
2022-04-01 17:03:54 +08:00
</configuration>