From dev-return-69937-apmail-cocoon-dev-archive=cocoon.apache.org@cocoon.apache.org Wed Jan 05 17:03:32 2005 Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 28457 invoked from network); 5 Jan 2005 17:03:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 5 Jan 2005 17:03:32 -0000 Received: (qmail 32929 invoked by uid 500); 5 Jan 2005 17:02:52 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 32709 invoked by uid 500); 5 Jan 2005 17:02:49 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 32497 invoked by uid 99); 5 Jan 2005 17:02:44 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from Unknown (HELO f1.bali.ac) (211.24.132.29) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 05 Jan 2005 09:02:17 -0800 Received: from 192.168.0.132 ([203.121.47.100]) (authenticated bits=0) by f1.bali.ac (8.12.8/8.12.8) with ESMTP id j05HAhnK018134 for ; Thu, 6 Jan 2005 01:10:44 +0800 From: Niclas Hedhman Organization: Private To: dev@cocoon.apache.org Subject: Re: [RT] Logging in 2.2 Date: Thu, 6 Jan 2005 01:01:34 +0800 User-Agent: KMail/1.5 References: <41DBD357.1000802@apache.org> <7557e99f0501050843629c16a3@mail.gmail.com> In-Reply-To: <7557e99f0501050843629c16a3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200501060101.34736.niclas@hedhman.org> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Thursday 06 January 2005 00:43, Gianugo Rabellino wrote: > On Wed, 05 Jan 2005 12:45:27 +0100, Carsten Ziegeler > > wrote: > > In the past we had several arguments about why logkit is better and so > > on but I think most of these arguments are not valid any more. > > Well, AFAIU a big one still stands true: security. I really hate the > idea that other code can write to my channel just by doing a > Logger.getLoggerFor(). There is also a slight issue with Log4J in its dealings with runtime dependencies and classloading that may hurt future efforts in Cocoon in "true blocks". Ex, If I have a running instance and decides to change the Log4J configuration to include an Appender that has an additional runtime dependency (javamail for instance) than is available from the Logger classloader (which they recommend to be the most top level CL one can manage to put it in), then you will need to bring down the entire server. This is the result of missing separation of interface and implementation, missing classloader strategy and total lack of IoC, and during Merlin days we were trying hard to stop depend on LogKit and make a full port to Log4J, but the work seemed overwhelming and the Log4J folks were a bit lost of why this is a problem for long-running applications. I also agree with Nicola's pointer of the problems with commons-logging, and to use it, you will need to throw away the factory and use your own IoC pattern, but then, that is essentially same as the current Logger interface... Maybe just throw away (Abstract)LogEnabled and do constructor injection instead. Or even relegate Logging to an ordinary service, which is looked up like any other component. Cheers Niclas -- --------------- If you want the rainbow, you gotta put up with the rain. - Steven Wright +---------//-------------------+ | http://www.dpml.net | | http://niclas.hedhman.org | +------//----------------------+