logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: isFatalEnabled()?
Date Tue, 19 Jun 2007 04:01:04 GMT

On Jun 15, 2007, at 7:28 AM, Bret Schuhmacher wrote:

> There are methods for isDebugEnabled and isInfoEnabled, but how do you
> check for isFatalEnabled or any of the other levels? I've used
> isEnabledFor(Priority.<level>), but Priority.FATAL and the rest are
> deprecated, so what's the best way to test for the unrepresented
> is<Level>Enabled levels?
> Thanks,

As other posters have mentioned, error and fatal errors should occur  
infrequently enough that you don't try to optimize their performance  
by trying to minimize unnecessary formatting and concatenations/   
However, you can check if any arbitrary level is enabled by using  


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

View raw message