Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder1.news.weretis.net!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: analysis of java application logs Date: Tue, 24 May 2011 08:49:52 -0400 Organization: albasani.net Lines: 26 Message-ID: References: <941ivgF1amU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net GHaV6SGL1il8CqfcNu8FU2PDPNujnQ1+yOBZsbLlskkuYhf7Wi6PQTOdX1JBQMTb+ZqQoHlF2tlwlv8jNA7XK7xaBTBkwdLatNbj3jriG7+vfNI+oiRZWebl2x6d1b2/ NNTP-Posting-Date: Tue, 24 May 2011 12:49:31 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="D0Eg/plcq6niUO4gE4RXdrPWfI0J1q7R+FZuKF292aBWNVvN5NmfJ1fejgXfESYqKRdjM+/fIyTtReb3vDONphhSdaJ329IADxS4Toy20c3UmvbvHYi6wcI8EmJA2s2J"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 In-Reply-To: Cancel-Lock: sha1:FelM2uPUPtCcBP0C+GimRupwEpo= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4532 Martin Gregorie wrote: > Fair point. However, my usual debugging statement takes the form: > > if (debug> 0) > debugger.trace(result + " = method(" + arg + ")"); > > Ugly, I know, but quite efficient, since when debugging is off even the > cost of the method call cost is. I use an integer to control debugging > rather than a boolean so I can control its volume: "java Application -dd" > would be expected to provide more detailed debugging output than "java > Application -d" > What's wrong with if ( logger.isDebugEnabled() ) ... or if ( logger.getLevel().isGreaterOrEqual( Logger.DEBUG )) ... ? -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg