11-14-05 10:45 PM
Ceki Gülcü wrote:
> At 06:46 PM 11/12/2005, Alex Karasulu wrote:
>
>
>
> If you are using SLF4J, then wrapping is not necessary. Instead of
> writing,
>
> if(logger.isDebugEnabled()) {
> logger.debug("User name is "+name+".");
> }
>
> you can write
>
> logger.debug("User name is {}.", name);
>
> The second form is more convenient, has a smaller footprint (both in
> memory and on disk) and is slightly faster.
>
> For more details, please refer to http://www.slf4j.org/faq.html#2.3
>
> I hope this helps,
Thanks again Ceki. I forgot that this second overload actually does the
check for us. Good thing to point out yet again and again. I'm sure
people will gravitate as I did to the old way.
Alex
[ Post a follow-up to this message ]
|