Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 77171 invoked from network); 8 Mar 2006 20:02:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Mar 2006 20:02:59 -0000 Received: (qmail 92327 invoked by uid 500); 8 Mar 2006 20:02:53 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 92255 invoked by uid 500); 8 Mar 2006 20:02:52 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 92243 invoked by uid 99); 8 Mar 2006 20:02:52 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Mar 2006 12:02:52 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [210.86.15.146] (HELO mta203-rme.xtra.co.nz) (210.86.15.146) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Mar 2006 12:02:51 -0800 Received: from mta2-rme.xtra.co.nz ([210.86.15.192]) by mta203-rme.xtra.co.nz with ESMTP id <20060308200228.HNCS15334.mta203-rme.xtra.co.nz@mta2-rme.xtra.co.nz> for ; Thu, 9 Mar 2006 09:02:28 +1300 Received: from [10.1.1.6] ([222.153.104.9]) by mta2-rme.xtra.co.nz with ESMTP id <20060308200228.CVVD18564.mta2-rme.xtra.co.nz@[10.1.1.6]> for ; Thu, 9 Mar 2006 09:02:28 +1300 Subject: Re: using multiple log4j.properties files From: Simon Kitching Reply-To: skitching@apache.org To: Jakarta Commons Users List In-Reply-To: <0IVT00569CTOHR50@mxout2.netvision.net.il> References: <0IVT00569CTOHR50@mxout2.netvision.net.il> Content-Type: text/plain Date: Thu, 09 Mar 2006 09:03:21 +1300 Message-Id: <1141848201.4772.23.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 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 On Wed, 2006-03-08 at 16:41 +0200, Asaf Lahav wrote: > Hi all, > > > > We are using common-logging and log4j in our product, and I was > wondering whether it's possible to use log4j when using multiple > log4j.properties files? > > What I would like to achieve is the possibility to create several > configuration (log4j.properties) files and that each log4j 'log' > instance will be able to use the log4j.properties configuration file > of its choice (according to application logic of course). > > How can I achieve that? Is it possible to do that with log4j? Commons-logging doesn't have any control over what configuration files log4j uses. Commons-logging binds to just *one* log4j installation, and lets that log4j installation configure itself. Commons-logging therefore cannot help you. You might want to follow up on the log4j list to see if there's anything in log4j that could help you. I have to say I don't understand what it is you are trying to do; sounds very odd to me. Normally the fact that a Log object can be created with any arbitrary category name, and the (single) configuration file allows different categories to be handled independently is enough. When you post to the log4j list I suggest you try and describe your requirements in more detail. Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org