<?xml version="1.0"?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<log4net>
<root>
<level value="ALL"/>
</root>
<logger name="info.Logging">
<level value="INFO"/>
<appender-ref ref="InfoAppender" />
</logger>
<logger name="debug.Logging">
<level value="DEBUG"/>
<appender-ref ref="DebugAppender" />
<!--<appender-ref ref="SmtpAppender" />-->
</logger>
<appender name="InfoAppender"
type="log4net.Appender.RollingFileAppender,log4net">
<param name="File" value="D:\log\info\" />
<param name="Encoding" value="UTF-8"/>
<param name="AppendToFile" value="true" />
<!-- 切割最多文件数 -1表示不限制产生日志文件数-->
<param name="MaxSizeRollBackups" value="-1"/>
<!-- 每个文件的大小限制 -->
<param name="MaximumFileSize" value="1MB"/>
<!-- RollingStyle Composite 综合 Size 按大小 Date 按时间 -->
<param name="RollingStyle" value="Composite" />
<param name="DatePattern" value=""Logs_"yyyyMMdd".txt"" />
<param name="StaticLogFileName" value="false" />
<layout type="log4net.Layout.PatternLayout,log4net">
<conversionPattern value="%newline Time: %date %newline IP: %aspnet-request{REMOTE_HOST} %newline Url: %aspnet-request{Server_Name}%aspnet-request{url} %aspnet-request{QUERY_STRING} %newline urlRefer: %aspnet-request{Http_Referer}%newline %logger -Message: %newline %message %newline %newline"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ALL" />
<param name="LevelMax" value="OFF" />
</filter>
</appender>
<!--输出到文件--><!--
<appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender,log4net">
</appender>-->
<appender name="DebugAppender"
type="log4net.Appender.RollingFileAppender,log4net">
<param name="File" value="D:\log\Debug\" />
<param name="Encoding" value="UTF-8"/>
<param name="AppendToFile" value="true" />
<!-- 切割最多文件数 -1表示不限制产生日志文件数-->
<param name="MaxSizeRollBackups" value="-1"/>
<!-- 每个文件的大小限制 -->
<param name="MaximumFileSize" value="1MB"/>
<!-- RollingStyle Composite 综合 Size 按大小 Date 按时间 -->
<param name="RollingStyle" value="Composite" />
<param name="DatePattern" value=""Logs_"yyyyMMdd".txt"" />
<param name="StaticLogFileName" value="false" />
<layout type="log4net.Layout.PatternLayout,log4net">
<conversionPattern value="%newline Time: %date %newline IP: %aspnet-request{REMOTE_HOST} %newline Url: %aspnet-request{Server_Name}%aspnet-request{url} %aspnet-request{QUERY_STRING} %newline urlRefer: %aspnet-request{Http_Referer}%newline %logger -Message: %newline %message %newline %newline"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ALL" />
<param name="LevelMax" value="OFF" />
</filter>
</appender>
</log4net>
</configuration>