Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 2434 invoked from network); 23 Apr 2008 13:08:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Apr 2008 13:08:42 -0000 Received: (qmail 35809 invoked by uid 500); 23 Apr 2008 13:08:40 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 35791 invoked by uid 500); 23 Apr 2008 13:08:40 -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 35779 invoked by uid 99); 23 Apr 2008 13:08:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2008 06:08:40 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [195.112.81.7] (HELO mail.ergonomics.ch) (195.112.81.7) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2008 13:07:49 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Appender configuration question Date: Wed, 23 Apr 2008 15:11:23 +0200 Message-ID: <3FE38194C8A3334A959B64B7D9A1E27B6E32BF@plejaden.seychelles.ergo> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Appender configuration question thread-index: Acikt+l8YuNY6J+YTe2vLRwikbOHfQAipNww From: "Bender Heri" To: "Log4J Users List" X-Virus-Checked: Checked by ClamAV on apache.org First:=20 It is not recommended to include the log4j.xml into a jar file, = especially not for third party library. Therefore the best way to solve = your problem is either to remove the file from the jar or - even better = - ask the vendor of the library to do that. If both is not possible, then you can try following: - manipulate the class path in order that your log4j.xml is found before = the one of the other library - your own code should accesses the log4j framework before the library = does, i.e. within a static initializer of your main class. Heri > -----Original Message----- > From: NBW [mailto:emailnbw@gmail.com] > Sent: Tuesday, April 22, 2008 10:28 PM > To: log4j-user@logging.apache.org > Subject: Appender configuration question >=20 >=20 > I have a situation where I have my application JAR file which=20 > includes a 3rd > party library JAR. This 3rd party library jar includes a=20 > log4j.xml file > which configures some file appenders. My application's main=20 > class contains a > static Logger and its main method uses=20 > BasicConfigurator.configure(). What I > am noticing is that my application log output and log output=20 > from the 3rd > party JAR are logging to BOTH the console and to the files=20 > specified in the > 3rd party JARs log4j.xml file. I want everything to only log to the > appenders my application specifies (namely the console). Can=20 > someone give me > some advice on doing this? Thanks. >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org