user2144555
user2144555

Reputation: 1313

Printing DEBUG messages in Log file

I'm using log4j to manage my logs in my Java application. I can print INFO , WARN and ERROR messages in the log file, but I can't see the DEBUG messages. How can I also print those messages?

This is my lo4j.properties file:

# Set root category priority to INFO and its only appender to CONSOLE.
log4j.rootCategory=DEBUG, CONSOLE

# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=ERROR
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n

What is wrong/missing in it?

Upvotes: 0

Views: 1465

Answers (1)

Jens
Jens

Reputation: 69440

remove this line:

log4j.appender.CONSOLE.Threshold=ERROR

Upvotes: 1

Related Questions