如果你使用eclipse之类开发工具 在src目录下新建一个文件:log4j.properties ,文件名就是这个,一个字也不能错 复制一下信息到文件中,保存即可log4j.rootLogger=info,stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout #dwr log config log4j.logger.uk.ltd.getahead.dwr= # Pattern to output the caller's file name and line number. log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%c:%L) %d{yyyy-MM-dd HH:mm:ss,SSS} ---- %m%n #log4j.appender.R=org.apache.log4j.RollingFileAppender #log4j.appender.R.File=D:\\logs\\web_log.log #log4j.appender.R.MaxFileSize=100KB # Keep one backup file #log4j.appender.R.MaxBackupIndex=100 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%p %d{yyyy-MM-dd HH\:mm\:ss,SSS} %n%t %c ---- %m%n #disable dwr log #log4j.logger.org.directwebremoting=ERROR
log4j:WARN Please initialize the log4j system properly.
最新推荐文章于 2023-10-26 11:48:20 发布