Question

Within my log4j.properties, log4j.rootLogger=DEBUG, stdout only shows debug data for hibernate. Can anyone explain this? I'm trying to debug other packages but none of them will work.

log4j.rootLogger=DEBUG, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %t %c:%L - %m%n
Was it helpful?

Solution

I realized that you do NOT have log4j in your pom, you need these 3 dependencies to log with log4j and slf4j:

slf4j-api-x.x.x.jar
slf4j-log4j12-x.x.x.jar
log4j-x.x.x.jar

log4j and slf4j-log4j12 should have the same version.

Please also note the commet from @Stefan Lindenberg

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top