Yes, Mike is exactly right here.
The only reason to wrap a log.debug() in log4j is when passing the argument(s) is very
expensive and a simple (2) string concatenation doesn't qualify. Even passing an object
with an expensive toString() argument isn't a problem because the log4j lib is
On Tue, Mar 17, 2009 at 11:48:37PM -0400, Jesus M. Rodriguez wrote:
It avoids the creation of the debug string, over time this can get
costly. We had a huge problem
with this at my last job and we improved performance quite a bit by
simply wrapping our
debug logs in an if statement. the JIT
James Bowes wrote:
On Tue, Mar 17, 2009 at 11:48:37PM -0400, Jesus M. Rodriguez wrote:
It avoids the creation of the debug string, over time this can get
costly. We had a huge problem
with this at my last job and we improved performance quite a bit by
simply wrapping our
debug logs in an if
That is interesting. Seems like a silly thing to do just for a debug
statement.
On Wed, Mar 18, 2009 at 12:05 PM, Devan Goodwin dgood...@redhat.com wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Wed, 18 Mar 2009 11:57:00 -0400
Justin Sherrill jsher...@redhat.com wrote:
Might
Travis Camechis wrote:
That is interesting. Seems like a silly thing to do just for a debug
statement.
From what i read on google, there's no real benefit if you're just doing:
log.debug(this is a message)
But when you start doing string concatenation and getting the values of
things in the
It avoids the creation of the debug string, over time this can get
costly. We had a huge problem
with this at my last job and we improved performance quite a bit by
simply wrapping our
debug logs in an if statement. the JIT pretty much compiles out the
block at runtime.
We are NOT that good at