log4j指定一个类的日志输出到文件
程序员文章站
2022-06-12 21:05:56
...
log4j.logger.com.aa.ClassName=INFO,f
log4j.appender.f = org.apache.log4j.RollingFileAppender
log4j.appender.f.File = D:\\test.log
log4j.appender.f.MaxFileSize = 30MB
log4j.appender.f.MaxBackupIndex = 3
log4j.appender.f.layout = org.apache.log4j.PatternLayout
log4j.appender.f.layout.ConversionPattern = %d{yyyy-MM-dd hh:mm:ss}:%p %t %c - %m%n
log4j.appender.f = org.apache.log4j.RollingFileAppender
log4j.appender.f.File = D:\\test.log
log4j.appender.f.MaxFileSize = 30MB
log4j.appender.f.MaxBackupIndex = 3
log4j.appender.f.layout = org.apache.log4j.PatternLayout
log4j.appender.f.layout.ConversionPattern = %d{yyyy-MM-dd hh:mm:ss}:%p %t %c - %m%n
上一篇: PS结合AI制作创意的动态福字
下一篇: Ubuntu使用rsync