avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <j...@socialchange.net.au>
Subject Re: Logkit: Logger.is[Priority]Enabled - suggested method.
Date Tue, 11 Dec 2001 11:02:32 GMT
On Tue, Dec 11, 2001 at 10:40:29AM +1100, david.gray@hic.gov.au wrote:
> 
> I have been playing with LogKit (Playing is good).
> 
> With the deprecation of the getPriority() method of the Logger class, a
> series of is[Priority]Enabled() methods were added.
> 
> May I suggest that 1 additional method is needed within the class and it
> would look something like this:
> 
>     /**
>      * Determine if messages of priority  will be logged.
>      *
>      * @return true if messages will be logged
>      */
>     public final boolean isEnabled(Priority p)
>     {
>         return getPriority().isLowerOrEqual( p );
>     }

Isn't that logic backwards? If getPriority has a LOWER priority (eg
DEBUG) that p's (eg WARN), then logging is disabled, not enabled.


--Jeff

> I think that this would complement the existing is[]Enabled() methods
> without breaking IOC and provide a little more flexibility.
> 
> Any comments - anyone?

--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message