Take the 2-minute tour ×

I'm new to Java but I thought I understood the logging concepts. From what I read, the TRACE level logging was enabled in v1.1 of commons-logging and 1.2.12 of log4j.

I'm using the following jars: commons-logging-api-1.1.jar & log4j-1.2.15.jar.

The code is:

if ( log.isTraceEnabled() ) {
  log.trace("some text");

However, it's emitting when my log4j.properties setting is DEBUG and the output is tagged as "DEBUG".

Is there something obvious that I'm doing wrong?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Trace is finer grained than debug. That explains why you are seeing trace statements when the setting is for debug (or finer). As for why it is tagged debug -- commons logging is responsible for that. See http://old.nabble.com/Re%3A-TRACE-vs-DEBUG-p4146626.html.

share|improve this answer

Your Answer


