如下所示在我的项目中创建了log4j.properties文件,但是未创建日志文件(test- service.log),而是日志消息记录在catalina.out中,如何解决此问题……。
log4j.debug = TRUE log4j.rootLogger = WARN,R log4j.appender.R = org.apache.log4j.RollingFileAppender log4j.appender.R.File = / opt / apache-tomcat-7.0.40 / logs / test-service.log log4j.appender.R.MaxFileSize = 1000KB log4j.appender.R.MaxBackupIndex = 5 log4j.appender.R.layout = org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern =%d {yyyy-MM-dd HH:mm:ss.SSSS}-%t-%x-%-5p-%-10c:%m%n
私有静态最终Logger LOG = Logger.getLogger(ClassName.class);