实现附件发送
parent
0ea6197ab8
commit
2bc0a8f3a9
@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" requirePermission="false" />
|
||||||
|
</configSections>
|
||||||
|
<log4net>
|
||||||
|
<root>
|
||||||
|
<!-- Value of priority may be ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF -->
|
||||||
|
<level value="DEBUG" />
|
||||||
|
<appender-ref ref="DebugAppender" />
|
||||||
|
<appender-ref ref="ErrorAppender" />
|
||||||
|
</root>
|
||||||
|
<appender name="DebugAppender" type="log4net.Appender.RollingFileAppender">
|
||||||
|
<!-- debug log: 记录 DEBUG, INFO 级别的日志 -->
|
||||||
|
<file value="App_Data\\Logs\\debug.log" />
|
||||||
|
<appendToFile value="true" />
|
||||||
|
<rollingStyle value="Composite" />
|
||||||
|
<datePattern value="yyyyMMdd" />
|
||||||
|
<maxSizeRollBackups value="100" />
|
||||||
|
<maximumFileSize value="10MB" />
|
||||||
|
<staticLogFileName value="true" />
|
||||||
|
<layout type="log4net.Layout.PatternLayout" >
|
||||||
|
<param name="ConversionPattern" value="%date [%p] [%logger] [%thread] - %message%newline" />
|
||||||
|
</layout>
|
||||||
|
<filter type="log4net.Filter.LevelRangeFilter">
|
||||||
|
<levelMax value="INFO" />
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
<appender name="ErrorAppender" type="log4net.Appender.RollingFileAppender">
|
||||||
|
<!-- error log: 记录 WARN,ERROR,FATAL 级别的日志 -->
|
||||||
|
<file value="App_Data\\Logs\\error.log" />
|
||||||
|
<appendToFile value="true" />
|
||||||
|
<rollingStyle value="Composite" />
|
||||||
|
<datePattern value="yyyyMMdd" />
|
||||||
|
<maxSizeRollBackups value="100" />
|
||||||
|
<maximumFileSize value="10MB" />
|
||||||
|
<staticLogFileName value="true" />
|
||||||
|
<layout type="log4net.Layout.PatternLayout" >
|
||||||
|
<param name="ConversionPattern" value="%date [%p] [%logger] [%thread] - %message%newline" />
|
||||||
|
</layout>
|
||||||
|
<filter type="log4net.Filter.LevelRangeFilter">
|
||||||
|
<levelMin value="WARN" />
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
</log4net>
|
||||||
|
</configuration>
|
Loading…
Reference in New Issue