Return-Path: Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: (qmail 24636 invoked from network); 10 Oct 2006 21:03:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Oct 2006 21:03:41 -0000 Received: (qmail 65909 invoked by uid 500); 10 Oct 2006 21:03:40 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 65872 invoked by uid 500); 10 Oct 2006 21:03:40 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 65854 invoked by uid 99); 10 Oct 2006 21:03:40 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Oct 2006 14:03:40 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [212.74.184.209] (HELO mail.qos.ch) (212.74.184.209) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Oct 2006 14:03:38 -0700 Received: from kal.qos.ch (kal [192.168.1.3]) by mail.qos.ch (Postfix) with ESMTP id 6825E15743C for ; Tue, 10 Oct 2006 23:03:16 +0200 (CEST) Message-Id: <6.0.0.22.0.20061010225849.045f48c8@mail.qos.ch> X-Sender: ceki@mail.qos.ch (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.0.22 Date: Tue, 10 Oct 2006 23:03:19 +0200 To: "Log4J Developers List" From: Ceki =?iso-8859-1?Q?G=FClc=FC?= Subject: Re: Enhanced FileAppender In-Reply-To: <3FE38194C8A3334A959B64B7D9A1E27B6E318F@plejaden.seychelles .ergo> References: <3FE38194C8A3334A959B64B7D9A1E27B6E318F@plejaden.seychelles.ergo> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Heri et al., Jumping in on this thread a little late, I believe that the decorator pattern would offer a significant advantage because it would handle derivatives of the FileAppender class such as RollingFileAppender. On the down side, in order to configure the embedded file appender, MultiFileAppender would need to somehow replay bits of configuration file (each time a new FileAppender needs to be created). I say that replay capability is required because in order to configure say a RollingFileAppender whose destination is based on the user's name (for example), one would need to configure a complete RollingFileAppender, including possibly all its options. This can be only be done by replaying the part of the configuration specific for the RollingFileAppender and only configurators can do that. Fortunately, log4j's version of JoranConfigurator can handle config replays quite nicely whereas logback's version of JoranConfigurator cannot, at least not today. However, assuming that MultiFileAppender's is mainly intended for short-term diagnosis and not as a basis for long-term logs, then the capability to output to distinct log files based on a user-specified logic (but without rollover capability) should meet most needs. Do you reckon you need rollover capability along with criteria-based log files in MultiFileAppender or would criteria-based log files alone suffice? At 10:03 AM 10/9/2006, Bender Heri wrote: >Hi all > >After having thought during the weekend I think Patrick's suggestion of=20 >Decorator Pattern would be the easiest way to go. > >Pro: >- The enhancement applies to all FileAppender >- There is no need to touch the code of the existing file appenders. They= =20 >work the same way as until now (except the append property is always true) [snip] >Heri --=20 Ceki G=FClc=FC Logback: The reliable, generic, fast and flexible logging framework for= Java. http://logback.qos.ch --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org