Hi

I believe it would, but to me that's not as readable and intention revealing
as if (log.isDebugEnabled())

/Jeppe

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:stripes-
> [EMAIL PROTECTED] On Behalf Of Andy
> Sent: 29. maj 2007 23:43
> To: Stripes Development List
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Stripes-dev] Logger
> 
> Hi,
> 
> On Sat, 26 May 2007, Ben Gunter wrote:
> > I agree. In fact, I was just thinking the same thing last night. In many
> > cases, it is the expense of collecting the information that is to be
> > logged that should be avoided by placing it in an if
> > (log.isDebugEnabled()) {} block.
> 
> Wouldn't replacing
> 
>     log.debug(complexExpression());
> 
> with
> 
>     log.debug(new Object[] { public String toString() {
>         return complexExpression();
>     }});
> 
> do the trick?
> 
> Andy
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Stripes-development mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-development
> 
> __________ NOD32 2296 (20070529) Information __________
> 
> This message was checked by NOD32 antivirus system.
> http://www.eset.com



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to