David,

David Sean Taylor wrote:
<snip>

> Speaking of logging, do you know how to do something like this:
> 
>       if (logging enabled for debug)
>             Log.debug( "WebPagePortlet caching URL: " + 
>                        url + 
>                        " Expiration: " + 
>                        pageExpiration +
>                        ", " +
>                        (pageExpiration - System.currentTimeMillis() ) +
>                        " milliseconds into the future" );             
> 


Use Log.getLogger().isDebugEnabled() for the default logger.  We currently only use 
the default logger.

  if (Log.getLogger().isDebugEnabled())
      Log.debug("First name = " + firstName
                + ", lastName = " + lastName
                + ", address = " + address);


> So that we don't have to construct all parameters even when debug level
> is off?
> 
> 


Paul Spencer


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to