Re: [Spacewalk-devel] making log statment debug as it was intended to be

2009-03-30 Thread Jeff Ortel
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

Re: [Spacewalk-devel] making log statment debug as it was intended to be

2009-03-18 Thread James Bowes
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

Re: [Spacewalk-devel] making log statment debug as it was intended to be

2009-03-18 Thread Justin Sherrill
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

Re: [Spacewalk-devel] making log statment debug as it was intended to be

2009-03-18 Thread Travis Camechis
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

Re: [Spacewalk-devel] making log statment debug as it was intended to be

2009-03-18 Thread Justin Sherrill
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

[Spacewalk-devel] making log statment debug as it was intended to be

2009-03-17 Thread jmrodri
Please wrap the log.debug() with if (log.isDebugEnabled()) {... log.debug(); } jesus Sent to you by jmrodri via Google Reader: making log statment debug as it was intended to be via Fedora Hosted Git Repositories - spacewalk.git/rss log by Justin Sherrill jsher...@redhat.com on 3/16/09 making

Re: [Spacewalk-devel] making log statment debug as it was intended to be

2009-03-17 Thread Jesus M. Rodriguez
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