|
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
|
|
|
<configuration>
|
|
|
|
|
<configSections>
|
|
|
|
|
<section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
|
|
|
|
|
</configSections>
|
|
|
|
|
<appSettings>
|
|
|
|
|
</appSettings>
|
|
|
|
|
<log4net>
|
|
|
|
|
<!--错误日志类-->
|
|
|
|
|
<logger name="logerror">
|
|
|
|
|
<!--日志类的名字-->
|
|
|
|
|
<level value="ALL" />
|
|
|
|
|
<!--定义记录的日志级别-->
|
|
|
|
|
<appender-ref ref="ErrorAppender" />
|
|
|
|
|
<!--记录到哪个介质中去-->
|
|
|
|
|
</logger>
|
|
|
|
|
<!--信息日志类-->
|
|
|
|
|
<logger name="loginfo">
|
|
|
|
|
<level value="ALL" />
|
|
|
|
|
<appender-ref ref="InfoAppender" />
|
|
|
|
|
</logger>
|
|
|
|
|
|
|
|
|
|
<logger name="heartbeat">
|
|
|
|
|
<level value="ALL" />
|
|
|
|
|
<appender-ref ref="HeartAppender" />
|
|
|
|
|
</logger>
|
|
|
|
|
|
|
|
|
|
<logger name="recordInfo">
|
|
|
|
|
<level value="ALL" />
|
|
|
|
|
<appender-ref ref="RecordInfoAppender" />
|
|
|
|
|
</logger>
|
|
|
|
|
|
|
|
|
|
<logger name="pilerlog">
|
|
|
|
|
<level value="ALL" />
|
|
|
|
|
<appender-ref ref="PilerlogAppender" />
|
|
|
|
|
</logger>
|
|
|
|
|
|
|
|
|
|
<logger name="leftPilerlog">
|
|
|
|
|
<level value="ALL" />
|
|
|
|
|
<appender-ref ref="LeftPilerlogAppender" />
|
|
|
|
|
</logger>
|
|
|
|
|
|
|
|
|
|
<logger name="rightPilerlog">
|
|
|
|
|
<level value="ALL" />
|
|
|
|
|
<appender-ref ref="RightPilerlogAppender" />
|
|
|
|
|
</logger>
|
|
|
|
|
|
|
|
|
|
<!--错误日志附加介质-->
|
|
|
|
|
<appender name="ErrorAppender" type="log4net.Appender.RollingFileAppender">
|
|
|
|
|
<!-- name属性指定其名称,type则是log4net.Appender命名空间的一个类的名称,意思是,指定使用哪种介质-->
|
|
|
|
|
<param name="File" value="Log\\LogError\\" />
|
|
|
|
|
<!--日志输出到exe程序这个相对目录下-->
|
|
|
|
|
<param name="AppendToFile" value="true" />
|
|
|
|
|
<!--输出的日志不会覆盖以前的信息-->
|
|
|
|
|
<param name="MaxSizeRollBackups" value="100" />
|
|
|
|
|
<!--备份文件的个数-->
|
|
|
|
|
<param name="MaxFileSize" value="10240" />
|
|
|
|
|
<!--当个日志文件的最大大小-->
|
|
|
|
|
<param name="StaticLogFileName" value="false" />
|
|
|
|
|
<!--是否使用静态文件名-->
|
|
|
|
|
<param name="DatePattern" value="yyyyMMdd".htm"" />
|
|
|
|
|
<!--日志文件名-->
|
|
|
|
|
<param name="RollingStyle" value="Date" />
|
|
|
|
|
<!--文件创建的方式,这里是以Date方式创建-->
|
|
|
|
|
<!--错误日志布局-->
|
|
|
|
|
<layout type="log4net.Layout.PatternLayout">
|
|
|
|
|
<param name="ConversionPattern" value="<HR COLOR=red>%n异常时间:%d [%t] <BR>%n异常级别:%-5p <BR>%n异 常 类:%c [%x] <BR>%n%m <BR>%n <HR Size=1>" />
|
|
|
|
|
</layout>
|
|
|
|
|
</appender>
|
|
|
|
|
<!--信息日志附加介质-->
|
|
|
|
|
<appender name="InfoAppender" type="log4net.Appender.RollingFileAppender">
|
|
|
|
|
<param name="File" value="Log\\LogInfo\\" />
|
|
|
|
|
<param name="AppendToFile" value="true" />
|
|
|
|
|
<param name="MaxFileSize" value="10240" />
|
|
|
|
|
<param name="MaxSizeRollBackups" value="100" />
|
|
|
|
|
<param name="StaticLogFileName" value="false" />
|
|
|
|
|
<param name="DatePattern" value="yyyyMMdd".htm"" />
|
|
|
|
|
<param name="RollingStyle" value="Date" />
|
|
|
|
|
<!--信息日志布局-->
|
|
|
|
|
<layout type="log4net.Layout.PatternLayout">
|
|
|
|
|
<param name="ConversionPattern" value="<HR COLOR=blue>%n日志时间:%d [%t] <BR>%n日志级别:%-5p <BR>%n日 志 类:%c [%x] <BR>%n%m <BR>%n <HR Size=1>" />
|
|
|
|
|
</layout>
|
|
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
|
<!--心跳日志附加介质-->
|
|
|
|
|
<appender name="HeartAppender" type="log4net.Appender.RollingFileAppender">
|
|
|
|
|
<param name="File" value="Log\\HeartInfo\\" />
|
|
|
|
|
<param name="AppendToFile" value="true" />
|
|
|
|
|
<param name="MaxFileSize" value="10240" />
|
|
|
|
|
<param name="MaxSizeRollBackups" value="100" />
|
|
|
|
|
<param name="StaticLogFileName" value="false" />
|
|
|
|
|
<param name="DatePattern" value="yyyyMMdd".htm"" />
|
|
|
|
|
<param name="RollingStyle" value="Date" />
|
|
|
|
|
<!--信息日志布局-->
|
|
|
|
|
<layout type="log4net.Layout.PatternLayout">
|
|
|
|
|
<param name="ConversionPattern" value="<HR COLOR=blue>%n日志时间:%d [%t] <BR>%n日志级别:%-5p <BR>%n日 志 类:%c [%x] <BR>%n%m <BR>%n <HR Size=1>" />
|
|
|
|
|
</layout>
|
|
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
|
<appender name="LeftPilerlogAppender" type="log4net.Appender.RollingFileAppender">
|
|
|
|
|
<param name="File" value="Log\\LeftPilerLog\\" />
|
|
|
|
|
<param name="AppendToFile" value="true" />
|
|
|
|
|
<param name="MaxFileSize" value="10240" />
|
|
|
|
|
<param name="MaxSizeRollBackups" value="100" />
|
|
|
|
|
<param name="StaticLogFileName" value="false" />
|
|
|
|
|
<param name="DatePattern" value="yyyyMMdd".htm"" />
|
|
|
|
|
<param name="RollingStyle" value="Date" />
|
|
|
|
|
<!--信息日志布局-->
|
|
|
|
|
<layout type="log4net.Layout.PatternLayout">
|
|
|
|
|
<param name="ConversionPattern" value="<HR COLOR=blue>%n日志时间:%d [%t] <BR>%n日志级别:%-5p <BR>%n日 志 类:%c [%x] <BR>%n%m <BR>%n <HR Size=1>" />
|
|
|
|
|
</layout>
|
|
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
|
<appender name="RightPilerlogAppender" type="log4net.Appender.RollingFileAppender">
|
|
|
|
|
<param name="File" value="Log\\RightPilerLog\\" />
|
|
|
|
|
<param name="AppendToFile" value="true" />
|
|
|
|
|
<param name="MaxFileSize" value="10240" />
|
|
|
|
|
<param name="MaxSizeRollBackups" value="100" />
|
|
|
|
|
<param name="StaticLogFileName" value="false" />
|
|
|
|
|
<param name="DatePattern" value="yyyyMMdd".htm"" />
|
|
|
|
|
<param name="RollingStyle" value="Date" />
|
|
|
|
|
<!--信息日志布局-->
|
|
|
|
|
<layout type="log4net.Layout.PatternLayout">
|
|
|
|
|
<param name="ConversionPattern" value="<HR COLOR=blue>%n日志时间:%d [%t] <BR>%n日志级别:%-5p <BR>%n日 志 类:%c [%x] <BR>%n%m <BR>%n <HR Size=1>" />
|
|
|
|
|
</layout>
|
|
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
|
<appender name="PilerlogAppender" type="log4net.Appender.RollingFileAppender">
|
|
|
|
|
<param name="File" value="Log\\PilerInfo\\" />
|
|
|
|
|
<param name="AppendToFile" value="true" />
|
|
|
|
|
<param name="MaxFileSize" value="10240" />
|
|
|
|
|
<param name="MaxSizeRollBackups" value="100" />
|
|
|
|
|
<param name="StaticLogFileName" value="false" />
|
|
|
|
|
<param name="DatePattern" value="yyyyMMdd".htm"" />
|
|
|
|
|
<param name="RollingStyle" value="Date" />
|
|
|
|
|
<!--信息日志布局-->
|
|
|
|
|
<layout type="log4net.Layout.PatternLayout">
|
|
|
|
|
<param name="ConversionPattern" value="<HR COLOR=blue>%n日志时间:%d [%t] <BR>%n日志级别:%-5p <BR>%n日 志 类:%c [%x] <BR>%n%m <BR>%n <HR Size=1>" />
|
|
|
|
|
</layout>
|
|
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--出入库记录日志附加介质-->
|
|
|
|
|
<appender name="RecordInfoAppender" type="log4net.Appender.RollingFileAppender">
|
|
|
|
|
<param name="File" value="Log\\RecordInfo\\" />
|
|
|
|
|
<param name="AppendToFile" value="true" />
|
|
|
|
|
<param name="MaxFileSize" value="10240" />
|
|
|
|
|
<param name="MaxSizeRollBackups" value="100" />
|
|
|
|
|
<param name="StaticLogFileName" value="false" />
|
|
|
|
|
<param name="DatePattern" value="yyyyMMdd".txt"" />
|
|
|
|
|
<param name="RollingStyle" value="Date" />
|
|
|
|
|
<!--信息日志布局-->
|
|
|
|
|
<layout type="log4net.Layout.PatternLayout">
|
|
|
|
|
<!--<param name="ConversionPattern" value="<HR COLOR=blue>%n日志时间:%d [%t] <BR>%n日志级别:%-5p <BR>%n日 志 类:%c [%x] <BR>%n%m <BR>%n <HR Size=1>" />-->
|
|
|
|
|
<param name="ConversionPattern" value="<-------------->%n日志时间:%d [%t] %n日志级别:%-5p %n日志内容:%m %n " />
|
|
|
|
|
</layout>
|
|
|
|
|
</appender>
|
|
|
|
|
|
|
|
|
|
</log4net>
|
|
|
|
|
</configuration>
|