commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <s_kitch...@paradise.net.nz>
Subject RE: [logging] Enterprise Common Logging... dare we say 2.0?
Date Fri, 10 Dec 2004 01:39:16 GMT
On Fri, 2004-12-10 at 14:23, Simon Kitching wrote:

> Alas, I don't think that is efficient enough. This approach would
> require a new Message object to be created *before* each call,
> regardless of whether that logging level was enabled or not.
> 
> Of course, each call could be wrapped in:
>   if (log.isWarnEnabled()) {
>     log.warn(new Message(....));
>   }
> but that would get tiring very quickly!

Not to mention that it is pretty much equivalent to:
  if (log.isWarnEnabled()) {  
    // compute internationalised message by hand
    // using a resource bundle, key + params
    log.warn(msgString);
  }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message