文件名称:Log4j日志包
文件大小:311KB
文件格式:ZIP
更新时间:2016-07-18 09:30:23
Log4j.jar
需要配置: log4j.rootLogger=debug,CONSOLE,testfile,A1,MAIL ################### # Console Appender ################### log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.Target=System.out log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=[framework] %d - %c -%-4r [%t] %-5p %c %x - %m%n #log4j.appender.CONSOLE.layout.ConversionPattern=[start]%d{DATE}[DATE]%n%p[PRIORITY]%n%x[NDC]%n%t[THREAD] n%c[CATEGORY]%n%m[MESSAGE]%n%n ################### # 单个日子记录 ################### log4j.appender.testfile=org.apache.log4j.FileAppender log4j.appender.testfile.File=c\:\\file.html log4j.appender.testfile.Append=false log4j.appender.testfile.layout=org.apache.log4j.HTMLLayout log4j.appender.testfile.layout.ConversionPattern=[framework] %d - %c -%-4r [%t] %-5p %c %x - %m%n ################### # 每天一个日志文件 ################### log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender log4j.appender.A1.File=c\:\\SampleMessages.html log4j.appender.A1.DatePattern=yyyyMMdd-HH log4j.appender.A1.layout=org.apache.log4j.HTMLLayout ################### # 邮件发送 ################### log4j.appender.MAIL=org.apache.log4j.net.SMTPAppender log4j.appender.MAIL.BufferSize=10 log4j.appender.MAIL.From=wisdom_xw@163.com log4j.appender.MAIL.SMTPHost=smtp.163.com log4j.appender.MAIL.SMTPUsername=wisdom_xw log4j.appender.MAIL.SMTPPassword= log4j.appender.MAIL.Subject=Messsage From LOG4J log4j.appender.MAIL.To=281510262@qq.com log4j.appender.MAIL.layout=org.apache.log4j.PatternLayout log4j.appender.MAIL.layout.ConversionPattern=[ErrorMessage] %d - %c -%-4r [%t] %-5p %c %x - %m%n
【文件预览】:
log4j-1.2.11.jar