Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 48411 invoked from network); 30 May 2006 19:02:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 May 2006 19:02:56 -0000 Received: (qmail 4074 invoked by uid 500); 30 May 2006 19:02:52 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 4042 invoked by uid 500); 30 May 2006 19:02:52 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 4031 invoked by uid 99); 30 May 2006 19:02:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 May 2006 12:02:51 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 64.74.244.71 is neither permitted nor denied by domain of geir@pobox.com) Received: from [64.74.244.71] (HELO chi.mobile-health-diary.com) (64.74.244.71) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 30 May 2006 12:02:51 -0700 Received: (qmail 23380 invoked from network); 30 May 2006 19:02:27 -0000 Received: from ool-43560edb.dyn.optonline.net (HELO ?192.168.1.104?) (geir@67.86.14.219) by b014.internal.mobile-health-diary.com with SMTP; 30 May 2006 19:02:27 -0000 Message-ID: <447C95E2.7020605@pobox.com> Date: Tue, 30 May 2006 11:58:42 -0700 From: Geir Magnusson Jr Reply-To: geir@pobox.com User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: [classlib] logging from within our implementation References: <447C6E8B.8020202@pobox.com> <447C8D4B.3060901@gmail.com> <447C92DC.9070909@pobox.com> In-Reply-To: <447C92DC.9070909@pobox.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Just to be clear, I certainly sympathize with Tim and support getting rid of implementation debug logging in the long term. Maybe the way to compromise/phrase it is agree that when a package is done, we will pitch all the logging? I can see why having logging around while things are being developed is helpful, and committing to SVN is ok since we want people to commit "early and often, and having to pull out logging would be a disincentive for someone working on something big. Does this help? "At the end we are going to dump any logging debris that have any performance or other burden like increase in dependencies" geir Geir Magnusson Jr wrote: > > > Tim Ellison wrote: >> Geir Magnusson Jr wrote: >>> Seems like there is an important issue here, but the discussion can't >>> seem to escape out of the thicket of the example. >>> >>> 1) Should we allow any logging from within the classlibrary? >> >> Just in case there was any doubt from my earlier postings... >> >> I think we should not be explicitly logging debug info as part of our >> class library implementation. > > In any form? > >>> 2) How should we do it? >>> >>> There are a bunch of ways for the second question... using j.u.l, using >>> IOC and injecting our own logging target to reduce dependencies and >>> make people think before logging, using aspects? >> >> Both j.u.l and IoC would require code in the implementation to perform >> the logging actions (or check the guard). Putting this logic throughout >> the class library will IMHO result in module coupling, code bloat and >> overall performance degradation (or no logging!). > > Right - that's why I was thinking of the latter. Something that would > have no runtime overhead, yet allow us to capture more information other > than just execution path and stack values :) >> >> Adding logging statements is expecting the class library developer to >> decide /a priori/ what debug|trace info is useful to the person trying >> to resolve a problem. Existing debug|trace tools work with the runtime >> to figure out the pertinent information as you are interested in it. >> (The only caveat being 'flight data recorder' type trace where the trace >> points are typically very low overhead and always on). >> >>> Comments? We probably should try to get to a conclusion in general... >> >> The logging info being proposed is developer-oriented. I hope that >> people are not expecting our users to understand our developer trace >> info -- we, as developers, have better tools than printf to figure out >> what is happening. > > I have to admit that I don't agree w/ "better" as a universally general > statement, as debug statements can include information provided by the > developer not immediately obvious. > > Is there some kind of aspect framework we can use? Then for > develeopers, they have to implicitly do something to get the stuff to > come out, it's not a runtime cost for anyone else, and the stuff stays > in the codebase for use later? > > geir > > --------------------------------------------------------------------- > Terms of use : http://incubator.apache.org/harmony/mailing.html > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org > For additional commands, e-mail: harmony-dev-help@incubator.apache.org > > --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org