Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #4539
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail |
|---|---|
| From | Lew <noone@lewscanon.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: analysis of java application logs |
| Date | Tue, 24 May 2011 12:26:00 -0400 |
| Organization | albasani.net |
| Lines | 40 |
| Message-ID | <irgm61$944$1@news.albasani.net> (permalink) |
| References | <bd933ace-5641-4711-9105-4e949a602b87@c1g2000yqe.googlegroups.com> <irdmdc$hfg$1@news.albasani.net> <ire4op$fgq$1@dont-email.me> <ireave$1m2$1@news.albasani.net> <iremt2$u3k$1@localhost.localdomain> <941ivgF1amU1@mid.individual.net> <irg8b1$ibj$1@localhost.localdomain> <irg9gr$bqo$1@news.albasani.net> <irgfs0$k9d$1@localhost.localdomain> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.albasani.net E3qm1u5FZ2tVI+pTw7Qrqr9GsnLWTnRkbQFClx3OhuefMv7hoZMcnO6y2Mcjdv+zl8VJ3pDMNRtN3fLbIgFMmHQ/aHkNuBf5jFCC8gGzhvxRd7mm07G4xLVlgUl7kkIF |
| NNTP-Posting-Date | Tue, 24 May 2011 16:25:37 +0000 (UTC) |
| Injection-Info | news.albasani.net; logging-data="jFP1gu+R0SLacLmvkQrV6jmqRm+C7YKhpHhH4IK0PHa9TjL6tklyyI8WeMGMTGIPuBLAvXq0FCXsHRgcVb9WQ03CzfDP0ZvbYCm1Qcpmwws908xt9KnaUb02CaB3wO4U"; 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 | <irgfs0$k9d$1@localhost.localdomain> |
| Cancel-Lock | sha1:mlAOADAtWaYklZuQ1ColIDLl8II= |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4539 |
Show key headers only | View raw
Martin Gregorie wrote:
> Lew wrote:
>> 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 )) ...
>> ?
> Not a lot, though that does involve method call overheads that you may
> not want in a tight loop.
Seems like it's a simple equality test that would be HotSpotted away.
> I initially created my simple ReportError logging class for Java 1.3,
> before the Logger class was introduced, and, as it does what I need, have
> seen no need to replace it. It was written to provide similar Java
> functionality to a set of C functions that I'd been using for many years.
>
> Its trace() methods are roughly equivalent to Logger.log(Level, String)
> and Logger.log(Level, String, Object[]) with all output sent to stderr.
--
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
analysis of java application logs Ulrich Scholz <d7@thispla.net> - 2011-05-23 00:50 -0700
Re: analysis of java application logs Robert Klemme <shortcutter@googlemail.com> - 2011-05-23 02:20 -0700
Re: analysis of java application logs jlp <jlp@jlp.com> - 2011-05-23 11:45 +0200
Re: analysis of java application logs Lew <noone@lewscanon.com> - 2011-05-23 09:11 -0400
Re: analysis of java application logs Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-05-23 19:16 +0200
Re: analysis of java application logs Lew <noone@lewscanon.com> - 2011-05-23 15:02 -0400
Re: analysis of java application logs Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-05-23 22:03 +0200
Re: analysis of java application logs Michael Wojcik <mwojcik@newsguy.com> - 2011-05-26 14:43 -0400
Re: analysis of java application logs Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-05-23 18:32 -0300
Re: analysis of java application logs Ulrich Scholz <d7@thispla.net> - 2011-05-25 06:00 -0700
Re: analysis of java application logs Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-05-25 19:04 -0300
Re: analysis of java application logs Martin Gregorie <martin@address-in-sig.invalid> - 2011-05-23 22:25 +0000
Re: analysis of java application logs Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-05-24 12:26 +0100
Re: analysis of java application logs Martin Gregorie <martin@address-in-sig.invalid> - 2011-05-24 12:29 +0000
Re: analysis of java application logs Lew <noone@lewscanon.com> - 2011-05-24 08:49 -0400
Re: analysis of java application logs Martin Gregorie <martin@address-in-sig.invalid> - 2011-05-24 14:37 +0000
Re: analysis of java application logs Lew <noone@lewscanon.com> - 2011-05-24 12:26 -0400
Re: analysis of java application logs Jim Gibson <jimsgibson@gmail.com> - 2011-05-24 11:00 -0700
Re: analysis of java application logs Lew <noone@lewscanon.com> - 2011-05-24 14:35 -0400
Re: analysis of java application logs Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-05-25 09:53 +0100
Re: analysis of java application logs Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-05-24 19:12 +0200
Re: analysis of java application logs Patricia Shanahan <pats@acm.org> - 2011-05-23 06:17 -0700
Re: analysis of java application logs Robert Klemme <shortcutter@googlemail.com> - 2011-05-23 20:33 +0200
Re: analysis of java application logs Martin Gregorie <martin@address-in-sig.invalid> - 2011-05-23 19:07 +0000
Re: analysis of java application logs CncShipper <anon@nowhere.com> - 2011-05-23 14:56 +0000
Re: analysis of java application logs Lew <noone@lewscanon.com> - 2011-05-23 11:43 -0400
Re: analysis of java application logs jlp <jlp@jlp.com> - 2011-05-23 18:00 +0200
Re: analysis of java application logs Lew <noone@lewscanon.com> - 2011-05-23 12:20 -0400
Re: analysis of java application logs Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-05-23 19:06 +0200
Re: analysis of java application logs Robert Klemme <shortcutter@googlemail.com> - 2011-05-23 20:27 +0200
Re: analysis of java application logs Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-05-23 21:02 +0200
Re: analysis of java application logs Lew <noone@lewscanon.com> - 2011-05-23 15:06 -0400
Re: analysis of java application logs Robert Klemme <shortcutter@googlemail.com> - 2011-05-23 22:10 +0200
Re: analysis of java application logs Lew <noone@lewscanon.com> - 2011-05-23 17:04 -0400
Re: analysis of java application logs Tom Anderson <twic@urchin.earth.li> - 2011-05-24 15:04 +0100
Re: analysis of java application logs Martin Gregorie <martin@address-in-sig.invalid> - 2011-05-24 14:50 +0000
Re: analysis of java application logs Michael Wojcik <mwojcik@newsguy.com> - 2011-05-26 14:58 -0400
Re: analysis of java application logs Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-05-30 16:23 +1200
Re: analysis of java application logs Lew <noone@lewscanon.com> - 2011-05-30 01:08 -0400
csiph-web