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

180 lines
8.3 KiB

8 months ago
<?xml version="1.0" encoding="utf-8"?>
8 months ago
<log4net>
<!-- 控制台日志配置 -->
<appender name="Console" type="log4net.Appender.ConsoleAppender">
<!-- 日志输出格式 -->
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %5level [%thread] (%file:%line) - %message%newline" />
8 months ago
</layout>
</appender>
<!-- 文件存储日志配置 -->
<appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
<!-- 保存文件的名称 -->
<file value="logs\WebApi.log" />
<appendToFile value="true" />
8 months ago
<!-- 文件的编码方式 -->
<param name="Encoding" value="UTF-8" />
8 months ago
<!-- 每个文件的大小 -->
<maximumFileSize value="100MB" />
8 months ago
<!-- 保存文件数量 -->
<maxSizeRollBackups value="2" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
8 months ago
<!-- 日志输出格式 -->
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %level %thread %logger - %message%newline" />
8 months ago
</layout>
</appender>
<logger name="Charger1" additivity="false">
<level value="ALL" />
<appender-ref ref="Charger1" />
</logger>
<appender name="Charger1" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs\Charger\" />
<param name="AppendToFile" value="true" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<Encoding value="UTF-8" />
<param name="StaticLogFileName" value="false" />
<param name="RollingStyle" value="Composite" />
<param name="DatePattern" value="yyyyMMdd/HH&quot;Charger1.log&quot;" />
<param name="maximumFileSize" value="200MB" />
<param name="MaxSizeRollBackups" value="5" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %level %thread %logger - %message%newline" />
</layout>
</appender>
<logger name="Charger2" additivity="false">
<level value="ALL" />
<appender-ref ref="Charger2" />
</logger>
<appender name="Charger2" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs\Charger\" />
<param name="AppendToFile" value="true" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<Encoding value="UTF-8" />
<param name="StaticLogFileName" value="false" />
<param name="RollingStyle" value="Composite" />
<param name="DatePattern" value="yyyyMMdd/HH&quot;Charger2.log&quot;" />
<param name="maximumFileSize" value="200MB" />
<param name="MaxSizeRollBackups" value="5" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %level %thread %logger - %message%newline" />
</layout>
</appender>
<logger name="Charger3" additivity="false">
<level value="ALL" />
<appender-ref ref="Charger3" />
</logger>
<appender name="Charger3" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs\Charger\" />
<param name="AppendToFile" value="true" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<Encoding value="UTF-8" />
<param name="StaticLogFileName" value="false" />
<param name="RollingStyle" value="Composite" />
<param name="DatePattern" value="yyyyMMdd/HH&quot;Charger3.log&quot;" />
<param name="maximumFileSize" value="200MB" />
<param name="MaxSizeRollBackups" value="5" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %level %thread %logger - %message%newline" />
</layout>
</appender>
<logger name="Charger4" additivity="false">
<level value="ALL" />
<appender-ref ref="Charger4" />
</logger>
<appender name="Charger4" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs\Charger\" />
<param name="AppendToFile" value="true" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<Encoding value="UTF-8" />
<param name="StaticLogFileName" value="false" />
<param name="RollingStyle" value="Composite" />
<param name="DatePattern" value="yyyyMMdd/HH&quot;Charger4.log&quot;" />
<param name="maximumFileSize" value="200MB" />
<param name="MaxSizeRollBackups" value="5" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %level %thread %logger - %message%newline" />
</layout>
</appender>
<logger name="Charger5" additivity="false">
<level value="ALL" />
<appender-ref ref="Charger5" />
</logger>
<appender name="Charger5" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs\Charger\" />
<param name="AppendToFile" value="true" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<Encoding value="UTF-8" />
<param name="StaticLogFileName" value="false" />
<param name="RollingStyle" value="Composite" />
<param name="DatePattern" value="yyyyMMdd/HH&quot;Charger5.log&quot;" />
<param name="maximumFileSize" value="200MB" />
<param name="MaxSizeRollBackups" value="5" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %level %thread %logger - %message%newline" />
</layout>
</appender>
<logger name="Charger6" additivity="false">
<level value="ALL" />
<appender-ref ref="Charger6" />
</logger>
<appender name="Charger6" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs\Charger\" />
<param name="AppendToFile" value="true" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<Encoding value="UTF-8" />
<param name="StaticLogFileName" value="false" />
<param name="RollingStyle" value="Composite" />
<param name="DatePattern" value="yyyyMMdd/HH&quot;Charger6.log&quot;" />
<param name="maximumFileSize" value="200MB" />
<param name="MaxSizeRollBackups" value="5" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %level %thread %logger - %message%newline" />
</layout>
</appender>
<logger name="Charger7" additivity="false">
<level value="ALL" />
<appender-ref ref="Charger7" />
</logger>
<appender name="Charger7" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs\Charger\" />
<param name="AppendToFile" value="true" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<Encoding value="UTF-8" />
<param name="StaticLogFileName" value="false" />
<param name="RollingStyle" value="Composite" />
<param name="DatePattern" value="yyyyMMdd/HH&quot;Charger7.log&quot;" />
<param name="maximumFileSize" value="200MB" />
<param name="MaxSizeRollBackups" value="5" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %level %thread %logger - %message%newline" />
</layout>
</appender>
<logger name="Charger8" additivity="false">
<level value="ALL" />
<appender-ref ref="Charger8" />
</logger>
<appender name="Charger8" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs\Charger\" />
<param name="AppendToFile" value="true" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<Encoding value="UTF-8" />
<param name="StaticLogFileName" value="false" />
<param name="RollingStyle" value="Composite" />
<param name="DatePattern" value="yyyyMMdd/HH&quot;Charger8.log&quot;" />
<param name="maximumFileSize" value="200MB" />
<param name="MaxSizeRollBackups" value="5" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %level %thread %logger - %message%newline" />
</layout>
</appender>
8 months ago
<root>
<level value="ALL" />
<appender-ref ref="Console" />
<appender-ref ref="RollingFile" />
8 months ago
</root>
</log4net>