Re: Any reason why I shouldn't write a Commons Logging/Log4J LogTarget?
Endre Stølsvik <[email protected]> Wed, 21 Dec 2005 10:04:11 +0100 (CET)
| Newsgroups | gmane.comp.java.webmacro.user |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 18 Dec 2005, Marc Palmer wrote:
|
| On 16 Nov 2005, at 17:51, Lane Sharman wrote:
|
| > please. plow ahead. we need it desperately.
| >
|
| Great - I will plough (bah - you yanks and your spellings) ahead!
Excellent!
I had a look at this myself, but didn't get around to actually do it. What
I _think_ I remember that I saw (!), was that there are instances where
the semantics ..
if (log.isDebugEnabled()) log.debug("construction"+object+"message");
.. wasn't follwed.
This is obviously absolutely essential for good performance:
*) Always use static Logger instances (or singleton instances), that is
NEVER create new Loggers "on demand" for e.g. each Template being loaded.
*) Always check whether the log-level is enabled _before constructing
the log message_.
PS: Anyone know what happened to the couple of patches/code I submitted?
The one with the Exception-chaining mechanism fix for java 1.4 (use
"default chaining" on java >= 1.4, and "do it ourselves" on earlier, to
avoid "double chaining"), and the URLEncoder-taking-encoding-argument
external class (since this lacks for java < 1.4)?
Regards,
Endre.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click