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.
Jeppe Cramon wrote:
> Hi
>
> I know that Stripes logger is so cleverly build that you can just call it
> with an array of arguments (vararg) and then it will first call toString on
> each object in case that the log level is enabled. This is really cool and
> makes for simple oneliners. However, sometimes I have the need to debug log
> some more information that requires me to gather some information before I
> can call log.debug(...)....
> For cases like this it would be really nice to have isDebugEnabled,
> isXLogLevelEnabled(), etc.
>
> How do you feel about us adding this to the logger?
> I could confuse others to start using isXxxxEnabled before calling the log
> method.. But this can be dealt with with better documentation which points
> out that this is not necessary in 9 out of 10 cases.
>
> /Jeppe
>
>
> -------------------------------------------------------------------------
> 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
>
-------------------------------------------------------------------------
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