Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 3517 invoked from network); 18 Jul 2005 22:46:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Jul 2005 22:46:52 -0000 Received: (qmail 28635 invoked by uid 500); 18 Jul 2005 22:46:51 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 28312 invoked by uid 500); 18 Jul 2005 22:46:49 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 28299 invoked by uid 99); 18 Jul 2005 22:46:49 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jul 2005 15:46:49 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [69.20.112.2] (HELO gate1.excedent.us) (69.20.112.2) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jul 2005 15:46:45 -0700 Received: from short (CPE000f66366977-CM0013711451aa.cpe.net.cable.rogers.com [69.199.52.234]) by gate1.excedent.us (SMTP Server) with ESMTP id 931E2B6844 for ; Mon, 18 Jul 2005 18:46:47 -0400 (EDT) From: "Moran Ben-David" To: Subject: Apache Commons Collection - CompositeConfiguration Date: Mon, 18 Jul 2005 18:47:52 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0020_01C58BC9.33E5C230" X-Mailer: Microsoft Office Outlook, Build 11.0.6353 Thread-Index: AcWL6rqYcO21wjoPTj69UvQxo5dx7w== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Message-Id: <20050718224647.931E2B6844@gate1.excedent.us> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0020_01C58BC9.33E5C230 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi. I am looking to configure Log4J in my app to use a composite configuration (one based on multiple files). Has anyone done this before? (I searched the list and didn't find any mention of it.) Am I correct in wanting to extend through org.apache.log4j.config to do this? Does anyone have information on how to use the org.apache.log4j.config package and extend with it? I'm going through the javadoc but was hoping that someone else was kind enough to document this process. Here's more info on what I'm trying to do in case anyone is kind enough to lend some eyes and braincells: I want the configuration that log4j will use to be derived from a series of files and not just from a single file. Propreties existing in two files, will be overriden by the higher priority file (i.e. the earlier one in the list or vice versa). I'm thinking that the best way to do this is to use the Apache Common Configuration framework's CompositeConfiguration: CompositeConfiguration config = new CompositeConfiguration(); config.addConfiguration(new SystemConfiguration()); config.addConfiguration(new PropertiesConfiguration("application.properties")); And then to get Log4J to pickup it's configuration from that "config" object. Now comes the task of plugging into log4j. Any answers to the questions above would be greatly appreciated. Thanks Moran Ben-David http://www.place-base.com ------=_NextPart_000_0020_01C58BC9.33E5C230--