From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13953 invoked by alias); 11 Feb 2008 18:52:03 -0000 Received: (qmail 13944 invoked by uid 22791); 11 Feb 2008 18:52:02 -0000 X-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_40,J_CHICKENPOX_53,J_CHICKENPOX_57,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 11 Feb 2008 18:51:45 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m1BIph8T004671 for ; Mon, 11 Feb 2008 13:51:43 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m1BIphG1031679 for ; Mon, 11 Feb 2008 13:51:43 -0500 Received: from localhost.localdomain (sebastian-int.corp.redhat.com [172.16.52.221]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m1BIpgNP003705 for ; Mon, 11 Feb 2008 13:51:43 -0500 Message-ID: <47B09909.4070707@redhat.com> Date: Mon, 11 Feb 2008 18:52:00 -0000 From: Andrew Cagney User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: frysk Subject: Re: a simpler logger [?] References: <475976DF.6070302@redhat.com> <4766D650.6080102@redhat.com> In-Reply-To: <4766D650.6080102@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2008-q1/txt/msg00059.txt.bz2 FYI, Much of frysk-sys is now using this logger; in switching my stack-smash bug seems to have gone back into hiding, sigh :-( In using this logger, I've also made the following refinements: -> The option is renamed to << -debug >> rather than << -trace >>; "trace" gets confusing when using tools such as ftrace (I'm not sure that -debug is much better though :-) -> The option parser is far more (far too?) forgiving in what it accepts; for instance: -debug frysk.expunit -- default to level FINE -debug frysk.expunit=FINEST -- explicit -debug FINE -- global -> The logger understands class inheritance - explicitly setting a super classes log-level automatically updates all sub-classes; for instance: -debug frysk.junit.TestCase -- enables logging for all instances of TestCase including sub-classes. Andrew Andrew Cagney wrote: > FYI, > > I've marked up frysk.expunit to use this logger (so people can see it > working). Enable it with something like: > ./TestRunner -trace FINE frysk.hpd.TestLoadCommand > or: > ./TtestRunner -trace frysk.expunit=FINEST frysk.hpd.TestLoadCommand > > Andrew > > Andrew Cagney wrote: >> Hi, >> >> I've just added a frysk.rsl (really simple logger?) package as a >> possible alternative to the java logging framework we're currently >> using. The "advantages" as I'll spin them are: >> >> -> the logging call is unlocked (at least in the logger level) >> so the ongoing saga of older log implementations deadlocking is avoided >> >> -> nested logging works >> >> -> it supports a completer interface >> so that << (fhpd) frysk log frysk.proc. >> can give a known list >> of loggers >> >> -> [I think] the call interface is simpler and lighter >> for instance << log.fine(this, "adding foo") >> or << log.fine(this, >> "adding foo=", foo); >> (we can add more methods as we need them :-) >> >> thoughts? >> >> Andrew >> >