简体   繁体   English

Java记录-调试级别日志未出现在Eclipse控制台中

[英]Java Logging - Debug Level log not appeared in the eclipse console

For debugging my application, trying to display debug level logs in the eclipse console with the below configuration. 要调试我的应用程序,请尝试使用以下配置在Eclipse控制台中显示调试级别日志。 But only INFO, ERROR and FATAL are displayed, but not the DEBUG level logs. 但是仅显示INFO,ERROR和FATAL,但不显示DEBUG级别日志。

# 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

Please help me to resolve. 请帮我解决。

将rootCategory更改为:

log4j.rootCategory=DEBUG ,file,stdout

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM