You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by EdoD <e3...@yahoo.com> on 2012/10/16 15:17:16 UTC

NullPointerException in Priority.isGreaterOrEqual

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"/>
 </logger>

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:

java.lang.NullPointerException
        at org.apache.log4j.Priority.isGreaterOrEqual(Priority.java:123)
        at org.apache.log4j.Category.isEnabledFor(Category.java:751)
        at
com.traffix.openblox.core.utils.logging.LoggingUtils.isLoggable(LoggingUtils.java:169)
        at
com.traffix.openblox.core.utils.logging.LoggingUtils.doLog(LoggingUtils.java:306) 

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