配置如下,
log4j.logger.kafkalog=INFO, kafkalog
log4j.additivity.kafkalog = false
log4j.appender.kafkalog=org.apache.log4j.RollingFileAppender
log4j.appender.kafkalog.File=D:/temp/logs/kafkalog.log
log4j.appender.kafkalog.layout=org.apache.log4j.PatternLayout
log4j.appender.kafkalog.MaxBackupIndex=5
log4j.appender.kafkalog.MaxFileSize=50MB
log4j.appender.kafkalog.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n
不知道为啥 log4j 日志不入日志文件,而是仅仅显示在 console 上
1
guyeuro OP 顶顶顶
|