Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: ArrayList in Eclipse Date: Thu, 21 Apr 2011 00:46:38 -0400 Organization: albasani.net Lines: 45 Message-ID: References: <919alnF872U1@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 ezMXyBY2X0V3LqzlfACjWBsUCXQ9TpTAaMPn+qv2vDoMhGOMX2nwzReIclrLUFVJpJxCTsj1DSph/mAJ/FoBctMfWeMmMkYnz2/kHhs3VwQBtRVHm1vPvLKRxDsqf0JV NNTP-Posting-Date: Thu, 21 Apr 2011 04:46:30 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="pgCsIfHDP6uTkhrxrWQVHZdNiApQaqLdhUj0C4/7d5vNODGyDpVVyAu2i7WANkXY3DNaNDmS0UakIDkzQL1IHb/sc35t3tQVtWwpgUMCyFaSoGqlQz8cDCwP20JEDluz"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 In-Reply-To: Cancel-Lock: sha1:41ph8+F6x4es5uKDFO5jHuwTOZc= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3180 Nasser M. Abbasi wrote: > markspace wrote: >> I've also found that well placed log statements are a faster way of >> debugging than stepping through code in a debugger. And debuggers can't >> be used when timing is a source of error. >> >> > It depends on the situation. In some cases, log debugging is > much more productive. Sometimes, one want to set a breakpoint > somewhere and examine data in a way not easily done by logging. > > One problem with log debugging is how to turn it on/off on > selected area of the applications. If one wants logging generated > from one function and not another, then one ends up using more > flag and switches. Also there can be a need to change the > level of debugging (verbose, summary, etc...) > > But I think a well designed logging facility can achieve > most of this, but I think this needs to be designed and > developed as part of the whole application. For large > applications, a good logging facility is essential. > > I think some programmers add logging after the application is > deveopled, instead of designing it as part of the application > itself. I agree twice over. The larger issue is that logging is part of the production environment. It is meant to serve the ops team; benefit to developers follows consequently. Understand that logging doesn't serve to verify variables, methods and the like. Logging serves to verify correct user-visible function; necessary to that purpose logging sometimes verifies variables, methods and the like (at jul's FINEST or log4j's DEBUG level). As you say, logging is an essential component of system design, every bit as much as the functional requirements. After all, no functional requirements succeed if the system cannot run. Logging and assertions are run-time, class-by-class controllable for a reason. -- Lew Honey, don't scare the children.