Log4Net

<configuration>
  <configSections>
    <section name="log4net"
      type="log4net.Config.Log4NetConfigurationSectionHandler,
            log4net-net-1.0"
        />
  </configSections>
  <log4net>
    <root>
      <level value="ALL" />
      <appender-ref ref="ReflectionLayout" />
    </root>
    <appender name="ReflectionLayout"  type="log4net.Appender.FileAppender" >
      <param name ="StaticLogFileName" value ="False" />
      <file type="log4net.Util.PatternString" value="C:/Log/%date{yyyy-MM-dd}.log"></file> //参数化
      <param name="RollingStyle" value="Date" />
      <prarm name="MaximumFileSize" value="10MB"/>
      <param name="AppendToFile" value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <param name="ConversionPattern"  value="%d %n %m %n" />//日志格式
      </layout>
    </appender>
  </log4net>

Log4Net,布布扣,bubuko.com

Log4Net

上一篇:UBUNTU SERVER 12.04搭建PHP环境


下一篇:可扩展Web架构与分布式系统