Ceki G�lc� wrote: 
[snip]
> Introducing isLoggable(), severe(), and warning() seems easy
> enough. Adding new levels SEVERE and WARNING is a diffent matter.  For
> example, if the SEVERE level has the same integer value as ERROR but a
> different String representation, when transmitted across the wire, it
> will go in as SEVERE and come out as ERROR. This is bound to confuse
> users. Preventing such minor inconsistencies is not so trivial.
> 
> Moreover, Level.SEVERE and Level.WARNING object are rarely referenced
> directly. Yes?

Level.SEVERE will indeed be used very rarely. Level.WARNING will be used
as argument to isLoggable() when generating the warning is expensive.
Some people do always enclose log calls with isLoggable() (or its 
equivalent) when Level is lower than ERROR just to save some
microseconds.
My (maybe naive approach) was to let the new constants refer to the
already defined Level instances. I have to think about how to handle 
the String representation issue best.

> I am somewhat surprised by this question. The getChainedPriority has
> been replaced with getEffectivelevel. This is fully documented:
>
http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/Category.html#
getChainedPriority()
> Have you missed it? Was there something unclear about the javadocs?

I just missed it. :-/

Wolf



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to