logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From EdoD <e313...@yahoo.com>
Subject NullPointerException in Priority.isGreaterOrEqual
Date Tue, 16 Oct 2012 13:17:16 GMT

I'm getting NPE from time to time when I try to log a TRACE message.
in log4j.xml I've defined the levels like this:

 <logger name="com.traffix">
        <level value="ALL"/>

and I'm using a Logger named "com.traffix.session.Session"

The problem is that Category.getEffectiveLevel() method sometime returns
null which causes the NPE below, but I don't understand how it can happen
because it iterates on the parent loggers until it finds a defined level.

The stack trace:

        at org.apache.log4j.Priority.isGreaterOrEqual(Priority.java:123)
        at org.apache.log4j.Category.isEnabledFor(Category.java:751)

Any idea?

View this message in context: http://old.nabble.com/NullPointerException-in-Priority.isGreaterOrEqual-tp34563342p34563342.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message