log4j:WARN Please initialize the log4j system properly.
来源:互联网 发布:淘宝分享不了怎么办 编辑:程序博客网 时间:2024/05/21 10:08
用eslipse做数据库JAR时显示如下提示:
log4j:WARN Please initialize the log4j system properly.
原因是没有对log4j这个jar进行文件配置。
将log4j.properties文件放在src目录下就可以了。
例如log4j.properties文件内容如下:
log4j.rootLogger=debug, stdout, R
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p - %m%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=firestorm.log
log4j.appender.R.MaxFileSize=100KB
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
log4j.logger.com.codefutures=DEBUG
如果不行,就放在class所在目录就KO了。
(经过测试,该方法正确)
补充:如果不需要输出 debug 信息,可以将 第一行 改为:log4j.rootLogger=stdout, R
- 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 问题解决(转)
- 关于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++ 堆栈、堆和内存泄漏
- 程序员——初章
- 中文分词器 jcseg
- DirectShow学习笔记总结
- 中断处理例程的返回值
- log4j:WARN Please initialize the log4j system properly.
- 对 JavaScript 进行单元测试的工具
- LINUX中SAMBA详细安装
- 工作一年了
- Bigloo 3.9a 发布,Schema 语言编译器
- java调用外部程序 并指定工作路径
- 各种字符串Hash函数比较
- JavaSE第十八讲:多态剖析
- js高级(二)