directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <>
Subject Re: [Logging] Is this required if we use substitutions
Date Fri, 06 Jun 2008 07:57:18 GMT
Felix Knecht wrote:
> I'm not totally up to date about which logger is used, but for log4j 
> i.e. exists also a method LOG.isDebugEnabled() to test this (it's 
> probably a little bit slower as it is not static), but its 
> configurable and the code should also stay in the bytecode.
In this case, the IS_DEBUG static variable is initialized with a call to 
LOG.isDebugEnabled(). As I said, it is just an ultimate optimization to 
allow the call to the isDebugEnabled() method to be done.

You have to know than in the decoder, this method is called for every 
single byte being read from the network layer, leading to a time penalty 
which is noticable. This is the reason why I switched to a static variable.

> What I don't exactly now is if the config can be changed at runtime.
yes it can, but we have to add some code in order to allow this.

cordialement, regards,
Emmanuel L├ęcharny

View raw message