logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Nguyen <timgo...@yahoo.com>
Subject Log Utility
Date Fri, 04 Apr 2008 19:02:00 GMT
Hi,

I am writing a Log Utility to check the log level first before creating a string object. For
example, if my log level is INFO, and I call:

log.debug(new String("test"));

It will still instantiate the String object even thought it doesn't log anything.

So I would like to write an Utility to check the level first, if the log level is lower, then
I don't have to instantiate the object and just skip it.
Anybody knows what is the easy way to do that?

Thanks,




      ____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No
Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message