geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <>
Subject Re: [Logs] Re: Logging code and Garbage Collection
Date Thu, 14 Aug 2003 22:26:46 GMT
On Thursday, August 14, 2003, at 05:08 PM, Alex Blewitt wrote:

> I fear that this is a tad pointless; the logs in Log4J are going to do 
> this anyway, and not cache the log values.

I disagree that this is pointless.  We need something for today (it 
took about a half hour), and when they get their stuff working, we 
remove my code.

> The big problem was that when doing log("String" + value + "message") 
> is that the string concatenation is always done, regardless of whether 
> the log level was enabled or not. That is why it was desirable to 
> surround with the if() statements in the first place ...

Duh.  We all agree on that.  But when you have debug("my single string 
message") there is not need to wrap, and when you do need the 
isDebugEnabled() call, it will be very fast.

> So the problem is still going to exist, albeit a factor slower since 
> it's going through this caching log :-/

Agree, that is what caching is all about.


View raw message