Carsten Ziegeler wrote:

Vadim Gritsenko wrote:


- getLogger().debug("redirect: entering session mode");
+ if (getLogger().isDebugEnabled()) {
+ getLogger().debug("redirect: entering session mode");
+ }


Hi Carsten,

I think you overdoing this a bit: if(){debug()} here is twice less efficient as single debug() call, because debug()'s argument is the constant from the class' constants pool, not a dynamic string.

I don't want to discuss if isDebugEnabled() is not as efficient as
debug() - but I really guess it is.
The reason for the change above is simple, it's a) consistent and
b) if you change the log message and add some dynamic information the
extra check is there and cannot be forgotten.

Ok, fair enough.

Vadim


This is really a problem, because we agreed a long time ago do to the
extra checks. Take a look at the code, there are still places where
the extra checks are not done as not all of us really care about this.


IIRC, we already agreed some time ago that simple debug output should not be wrapped into if().


Hmm, I cannot remember anything like this, sorry. (weak mind perhaps?)

Carsten



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to