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 Sc...@sybase.com on 2001/11/30 19:20:54 UTC

Is Category.getPriority() supposed return null if Priority is not explicitly set??

I wrote some code to check the priority of a particular class but
I am getting a null pointer returned. My assumption was that the
priority that was "inherited" would be returned if not explictly set
on that Category. The alternative is to call isEnabledFor() and loop
through all standard priorities to determine the reporting level
for a class. Seems like returning the inherited Priority would be
a desirable thing.

-Scott



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Is Category.getPriority() supposed return null if Priority is not explicitly set??

Posted by T Master <tm...@iknowledgeinc.com>.
It's allowed Scott. Strange as it seems.
Ceiki told me to lok at the source code to see why.
Check the archives for my message and the response.


----- Original Message -----
From: <Sc...@sybase.com>
To: <lo...@jakarta.apache.org>
Sent: Friday, November 30, 2001 11:20 AM
Subject: Is Category.getPriority() supposed return null if Priority is not
explicitly set??


>
> I wrote some code to check the priority of a particular class but
> I am getting a null pointer returned. My assumption was that the
> priority that was "inherited" would be returned if not explictly set
> on that Category. The alternative is to call isEnabledFor() and loop
> through all standard priorities to determine the reporting level
> for a class. Seems like returning the inherited Priority would be
> a desirable thing.
>
> -Scott



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Is Category.getPriority() supposed return null if Priority is not explicitly set??

Posted by Ceki Gulcu <ce...@qos.ch>.
There is a method called getChainedLevel in the Category class. Just use that. 

At 13:20 30.11.2001 -0500, you wrote:

>I wrote some code to check the priority of a particular class but
>I am getting a null pointer returned. My assumption was that the
>priority that was "inherited" would be returned if not explictly set
>on that Category. The alternative is to call isEnabledFor() and loop
>through all standard priorities to determine the reporting level
>for a class. Seems like returning the inherited Priority would be
>a desirable thing.
>
>-Scott
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>