1

Using log4j to log specific events (DEBUG, ERROR, FATAL..) having specified in the properties file to log only DEBUG i still end up having other error messages logged in the file. Is there a way to tell log4j to log only specific events to a file?

Thank You.

slex
  • 855
  • 2
  • 10
  • 20

1 Answers1

0

Read on appender additivity. You must set it to false. A similar question was asked before on SO.

Relevant code snippet:

<category name="org.quartz" additivity="false">
    <priority value="DEBUG" />
</category>

Version for a properties file:

log4j.additivity.org.quartz = false
Community
  • 1
  • 1
darioo
  • 46,442
  • 10
  • 75
  • 103