为什么我的第二个记录器出错但第一个没有?
错误:
log4j:WARN No appenders could be found for logger (StatQueryDobadoCategory).
log4j:WARN Please initialize the log4j system properly.
这是 log4j.properties:
log4j.category.ThingsPerMinuteGraphCategory=DEBUG, ThingsPerMinuteGraphAppender
log4j.appender.ThingsPerMinuteGraphAppender=org.apache.log4j.RollingFileAppender
log4j.appender.ThingsPerMinuteGraphAppender.File=./logs/ThingsPerMinuteGraph.log
log4j.appender.ThingsPerMinuteGraphAppender.MaxFileSize=20MB
log4j.appender.ThingsPerMinuteGraphAppender.MaxBackupIndex=5
log4j.appender.ThingsPerMinuteGraphAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.ThingsPerMinuteGraphAppender.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} - %m
log4j.additivity.ThingsPerMinuteGraphCategory=false
log4j.category.StatQueryDobadoCategory=DEBUG, StatQueryDobadoAppender
log4j.appender.StatQueryDobadoAppender=org.apache.log4j.RollingFileAppender
log4j.appender.StatQueryDobadoAppender.File=./logs/StatQueryDobadoCategory.log
log4j.appender.StatQueryDobadoAppender.MaxFileSize=20MB
log4j.appender.StatQueryDobadoAppender.MaxBackupIndex=5
log4j.appender.StatQueryDobadoAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.StatQueryDobadoAppender.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} - %m
log4j.additivity.StatQueryDobadoCategory=false