<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,ImosLog"/>
  </configSections>
  <log4net>
        <logger name="MV Log">
            <level value="ALL"/>
            <appender-ref ref="rollingFile"/>
            <!--<appender-ref ref="LogDebug"/>
            <appender-ref ref="LogInfo"/>
            <appender-ref ref="LogWarn"/>
            <appender-ref ref="LogError"/>
            <appender-ref ref="LogFatal"/>-->
        </logger>
        <appender name="rollingFile" type="log4net.Appender.RollingFileAppender">
            <param name="File" value="CSLog\"/>
            <param name="AppendToFile" value="true"/>
            <param name="RollingStyle" value="Composite"/>
            <!-- <datePattern value="-yyyy-MM&quot;.log&quot;" /> -->
            <datePattern value="yyyyMMdd&quot;.log&quot;"/>
            <param name="MaxSizeRollBackups" value="5"/>
            <param name="maximumFileSize" value="20MB"/>
            <param name="StaticLogFileName" value="false"/>
            <layout type="log4net.Layout.PatternLayout">
                <param name="ConversionPattern" value="%n时间：%d [%t] %n级别：%-5p %n信息：%m %n位置：%l %n "/>
            </layout>
            <filter type="log4net.Filter.LevelRangeFilter">
                <param name="LevelMin" value="DEBUG"/>
                <param name="LevelMax" value="FATAL"/>
            </filter>
        </appender>
        
        
        <!--信息日志(包括所有类别的信息，可根据需要定制)  文件名生成规则、记录的日志类型等，全放在一个文件中，也可以分开放到不同文件中-->
        <!-- 可指定文件名规则及大小、个数，并循环记录，目前限制为日志文件大小20MB, 最多5个文件-->
        <!-- DEBUG为最低 FATAL 为最高 -->
        <appender name="LogDebug" type="log4net.Appender.RollingFileAppender,log4net">
            <param name="File" value="CSLog\Debug\"/>
            <param name="AppendToFile" value="true"/>
            <param name="RollingStyle" value="Composite"/>
            <datePattern value="yyyyMMdd&quot;.log&quot;"/>
            <param name="MaxSizeRollBackups" value="5"/>
            <param name="maximumFileSize" value="20MB"/>
            <param name="StaticLogFileName" value="false"/>
            <layout type="log4net.Layout.PatternLayout,log4net">
                <param name="ConversionPattern" value="%n时间：%d [%t] %n级别：%-5p %n信息：%m %n位置：%l %n "/>
            </layout>
            <filter type="log4net.Filter.LevelRangeFilter">
                <param name="LevelMin" value="DEBUG"/>
                <param name="LevelMax" value="DEBUG"/>
            </filter>
        </appender>
        <appender name="LogInfo" type="log4net.Appender.RollingFileAppender,log4net">
            <param name="File" value="CSLog\Info\"/>
            <param name="AppendToFile" value="true"/>
            <param name="RollingStyle" value="Composite"/>
            <!-- <datePattern value="-yyyy-MM&quot;.log&quot;" /> -->
            <datePattern value="yyyyMMdd&quot;.log&quot;"/>
            <param name="MaxSizeRollBackups" value="5"/>
            <param name="maximumFileSize" value="20MB"/>
            <param name="StaticLogFileName" value="false"/>
            <layout type="log4net.Layout.PatternLayout,log4net">
                <param name="ConversionPattern" value="%n时间：%d [%t] %n级别：%-5p %n信息：%m %n位置：%l %n "/>
            </layout>
            <filter type="log4net.Filter.LevelRangeFilter">
                <param name="LevelMin" value="INFO"/>
                <param name="LevelMax" value="INFO"/>
            </filter>
        </appender>
        <!--警告,注意,通知日志-->
        <appender name="LogWarn" type="log4net.Appender.RollingFileAppender,log4net">
            <param name="File" value="CSLog\Warn\"/>
            <param name="AppendToFile" value="true"/>
            <param name="RollingStyle" value="Composite"/>
            <!-- <datePattern value="-yyyy-MM&quot;.log&quot;" /> -->
            <datePattern value="yyyyMMdd&quot;.log&quot;"/>
            <param name="MaxSizeRollBackups" value="5"/>
            <param name="maximumFileSize" value="20MB"/>
            <param name="StaticLogFileName" value="false"/>
            <layout type="log4net.Layout.PatternLayout,log4net">
                <param name="ConversionPattern" value="%n时间：%d [%t] %n级别：%-5p %n信息：%m %n位置：%l %n "/>
            </layout>
            <filter type="log4net.Filter.LevelRangeFilter">
                <param name="LevelMin" value="WARN"/>
                <param name="LevelMax" value="WARN"/>
            </filter>
        </appender>
        <!--错误日志,一般是异常日志-->
        <appender name="LogError" type="log4net.Appender.RollingFileAppender,log4net">
            <param name="File" value="CSLog\Error\"/>
            <param name="AppendToFile" value="true"/>
            <param name="RollingStyle" value="Composite"/>
            <!-- <datePattern value="-yyyy-MM&quot;.log&quot;" /> -->
            <datePattern value="yyyyMMdd&quot;.log&quot;"/>
            <param name="MaxSizeRollBackups" value="5"/>
            <param name="maximumFileSize" value="20MB"/>
            <param name="StaticLogFileName" value="false"/>
            <layout type="log4net.Layout.PatternLayout,log4net">
                <param name="ConversionPattern" value="%n时间：%d [%t] %n级别：%-5p %n信息：%m %n位置：%l %n "/>
            </layout>
            <filter type="log4net.Filter.LevelRangeFilter">
                <param name="LevelMin" value="ERROR"/>
                <param name="LevelMax" value="ERROR"/>
            </filter>
        </appender>
        <!--致命错误日志,-->
        <appender name="LogFatal" type="log4net.Appender.RollingFileAppender,log4net">
            <param name="File" value="CSLog\Fatal\"/>
            <param name="AppendToFile" value="true"/>
            <param name="RollingStyle" value="Composite"/>
            <!-- <datePattern value="-yyyy-MM&quot;.log&quot;" /> -->
            <datePattern value="yyyyMMdd&quot;.log&quot;"/>
            <param name="MaxSizeRollBackups" value="5"/>
            <param name="maximumFileSize" value="20MB"/>
            <param name="StaticLogFileName" value="false"/>
            <layout type="log4net.Layout.PatternLayout,log4net">
                <param name="ConversionPattern" value="%n时间：%d [%t] %n级别：%-5p %n信息：%m %n位置：%l %n "/>
            </layout>
            <filter type="log4net.Filter.LevelRangeFilter">
                <param name="LevelMin" value="FATAL"/>
                <param name="LevelMax" value="FATAL"/>
            </filter>
        </appender>

  </log4net>
</configuration>