log4j:WARN Please initialize the log4j system properly 问题解决
来源:互联网 发布:高薪网络销售招聘 编辑:程序博客网 时间:2024/05/02 02:28
在tomcat启动的时候,出现这个警告:
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax).
log4j:WARN Please initialize the log4j system properly.
解决办法:
log4j.properties文件需要放到web-inf/class目录下面,在eclipse里面放到src目录下面,会自动拷贝到class目录下面去。
文件里面的内容如下即可:
# For JBoss: Avoid to setup Log4J outside $JBOSS_HOME/server/default/deploy/log4j.xml!
# For all other servers: Comment out the Log4J listener in web.xml to activate Log4J.
log4j.rootLogger=INFO, stdout, logfile
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n
log4j.appender.logfile=org.apache.log4j.RollingFileAppender
log4j.appender.logfile.File=F:/dream/workspace/MyZhiNengTuanDemo/WebRoot/WEB-INF/znt.log
log4j.appender.logfile.MaxFileSize=512KB
# Keep three backup files.
log4j.appender.logfile.MaxBackupIndex=3
# Pattern to output: date priority [category] - message
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n
log4j.properties文件路径:在eclipse目录下的文件中,可通过搜索找到
其中log4j.appender.logfile.File=F:/dream/workspace/MyZhiNengTuanDemo/WebRoot/WEB-INF/znt.log这句话中的路径可以选择自己项目下的WEB-INF目录下。
- log4j:WARN Please initialize the log4j system properly 问题解决
- log4j:WARN Please initialize the log4j system properly 问题解决
- log4j:WARN Please initialize the log4j system properly 问题解决办法
- (转)log4j:WARN Please initialize the log4j system properly 问题解决
- log4j:WARN Please initialize the log4j system properly 问题解决
- log4j:WARN Please initialize the log4j system properly 问题解决(转)
- log4j:WARN Please initialize the log4j system properly 问题解决
- 【问题解决】log4j:WARN Please initialize the log4j system properly.
- WARN Please initialize the log4j system properly.
- WARN Please initialize the log4j system properly.
- log4j:WARN Please initialize the log4j system properly
- log4j:WARN Please initialize the log4j system properly
- 关于log4j:WARN Please initialize the log4j system properly. 警告
- log4j:WARN Please initialize the log4j system properly
- log4j:WARN please initialize the log4j system properly
- log4j:WARN Please initialize the log4j system properly.
- log4j:WARN Please initialize the log4j system properly解决办法
- log4j:WARN Please initialize the log4j system properly解决办法
- 关于c函数c++函数的调用问题
- Struts2
- 指针详解
- 【LeetCode with Python】 Generate Parentheses
- 数字水印的嵌入与检测 WaterMark 1.0
- log4j:WARN Please initialize the log4j system properly 问题解决
- 【LeetCode with Python】 Best Time to Buy and Sell Stock
- 用带有PTDD Partition Table Doctor的WinPE处理硬盘0磁道损坏问题
- 在ACCESS中,"!"及"."符号之差别为何?
- 用带有PTDD Partition Table Doctor的WinPE修复硬盘主引导记录
- -
- tomcat控制台输出信息时会卡住的原因
- 【LeetCode with Python】 LRU Cache
- QQ宠物打工学习对照表