[logback-user] TRACE vs. DEBUG

oss at mrab.de oss at mrab.de
Thu Sep 2 16:40:30 CEST 2010


Hi all,
I'm using LOGBack for some months now figured out something strange
with the log levels:

In the Level class the int values for TRACE and DEBUG are different,
but the Integers are both set to the int value of the DEBUG level.
The filters in JaninoEventEvaluator use the Integers (which are
equal) so  "level==DEBUG" matches both DEBUG and TRACE messages.

Here is some code from logback-classic (0.9.24)
ch.qos.logback.classic.Level:
//////////////////////////////////////////////////////////////////
  public static final int DEBUG_INT = 10000;
  public static final int TRACE_INT = 5000;
  public static final Integer DEBUG_INTEGER = new Integer(DEBUG_INT);
  public static final Integer TRACE_INTEGER = new Integer(DEBUG_INT);
//////////////////////////////////////////////////////////////////

Is that a feature or a copy and paste bug?

Any information is appreciated.

Cheers,

Melchior


More information about the Logback-user mailing list