logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Skeet" <jon.sk...@peramon.com>
Subject RE: Category Priorities
Date Fri, 07 Sep 2001 12:56:26 GMT
Having looked at this a bit further, I suspect I know what's going on.

> However, if I try to obtain the Priority of my class at runtime using
> cat.getPriority(), I receive a NullPointerException.

Are you sure you don't mean if you try to *use* the Priority returned by
cat.getPriority() you receive a NullPointerException? Looking at the
code for getPriority, there's no way that should cause a
NullPointerException unless cat is null - but it may well *return* null,
if there isn't a priority set for that category specifically.

> I then tried cat.getRoot().getPriority(), which works.  I haven`t
> explicitly set the priority on any other 
> com.mycompany.product classes,
> yet a Priority is available.  Why does com.mycompany.product 
> not inherit this property?

It does, but that's not what getPriority is meant to return (as the docs
say). I believe you want getChainedPriority().


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

View raw message