本文介绍了Java日志记录-调试级别日志未出现在Eclipse控制台中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
要调试我的应用程序,请尝试使用以下配置在Eclipse控制台中显示调试级别日志.但是仅显示INFO,ERROR和FATAL,而不显示DEBUG级别日志.
For debugging my application, trying to display debug level logs in the eclipse console with the below configuration. But only INFO, ERROR and FATAL are displayed, but not the DEBUG level logs.
# Direct log messages to a log file
log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
log4j.appender.file.File=D:/log/oms-web.log
#log4j.appender.file.MaxFileSize=5MB
#log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern= %d{yyyy-MM-dd HH:mm:ss} [%t] %p %c - %m%n
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
# Pattern to output the date/time, calling class and message.
log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p %C.%M(): %m%n
# Root logger option
log4j.rootCategory=INFO ,file,stdout,DEBUG
log4j.category.org.springframework.beans.factory=OFF
# Log everything. Good for troubleshooting
log4j.logger.org.hibernate=OFF
# Log all JDBC parameters
log4j.logger.org.hibernate.type=OFF
log4j.logger.org.springframework=OFF
请帮助我解决.
推荐答案
将rootCategory更改为:
Change the rootCategory to:
log4j.rootCategory=DEBUG ,file,stdout
这篇关于Java日志记录-调试级别日志未出现在Eclipse控制台中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!