The object reference and method call are still performed even if nothing 
gets logged.  By using a simple test, that overhead is removed if it is 
not needed.
This is actually a big deal.  It is even better if the test can be done 
on a constant, because then the compiler can decide if the code needs to 
be included or not and there is no overhead if the constant is false.

marc fleury wrote:

>???
>
>I have a conflict on ServiceDeployer.java
>
>the conflict is due to the inclusion of "if (debug) log.debug(...)"
>
>with debug being log.isDebugEnabled()...
>
>do we need to explicitely do that? I thought part of the interest is that
>the log4j thing would not do anything with the messages if debug was not
>enabled so why the explicit test?
>
>I will remove these unless something clearly says the contrary
>
>marcf
>
>xxxxxxxxxxxxxxxx
>Marc Fleury
>President
>JBoss Group, LLC
>xxxxxxxxxxxxxxxx
>
>
>_______________________________________________
>Jboss-development mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/jboss-development
>




_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to