Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 74577 invoked from network); 7 Apr 2009 14:01:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Apr 2009 14:01:40 -0000 Received: (qmail 99111 invoked by uid 500); 7 Apr 2009 14:01:39 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 99042 invoked by uid 500); 7 Apr 2009 14:01:39 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 99034 invoked by uid 99); 7 Apr 2009 14:01:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2009 14:01:39 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of xhhsld@gmail.com designates 74.125.92.26 as permitted sender) Received: from [74.125.92.26] (HELO qw-out-2122.google.com) (74.125.92.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2009 14:01:31 +0000 Received: by qw-out-2122.google.com with SMTP id 3so1839438qwe.25 for ; Tue, 07 Apr 2009 07:01:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=EZ8PKQWRdRYvHsntRbXjXYT0BlzX7u+jpZsgLUygKY8=; b=ZTBIGbUtHvIFK/lx15QVhZFivUwIK4hipYNBTnjRqOWMCutmU6VNYhnPmPUwtZB+4U EMOgrR82i71bCXipxKQ422gv8eKgTtyy14GcrZ1XXuhvbudB9NK8GghWcrt/cy+6J40f 7jM2/bXNR0/cnUx55TcBy7z+qBNCiYmNGh8Vo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Ce6JTrnLhMgwEnWyhTgv2aq9eyXMk0qe793/LYlpFUoFZsnpHe8S2CqG3gyfq8MCJd 1+hedOm3GqPYWFB3+GMpJFZp2CvP4aXWoEDY28hmBW+FO8HXyy1ymiolLJKiWTCZjIH1 MPwMR4Km4aDAHPrIc36CHdRghROKmtl+yzR1U= MIME-Version: 1.0 Received: by 10.229.73.204 with SMTP id r12mr40247qcj.31.1239112870350; Tue, 07 Apr 2009 07:01:10 -0700 (PDT) In-Reply-To: <1102116558@web.de> References: <1102116558@web.de> Date: Tue, 7 Apr 2009 22:01:10 +0800 Message-ID: <45f744e40904070701x1f827d4flcad3bd62114f411a@mail.gmail.com> Subject: Re: Problems using log4j Gbean From: Ivan To: user@geronimo.apache.org Content-Type: multipart/alternative; boundary=00163646d7d47953c10466f77252 X-Virus-Checked: Checked by ClamAV on apache.org --00163646d7d47953c10466f77252 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Are the application A has the same package names with the package B ? I mean In the properties File for application A : log4j.logger.de.test.webapp.util=3DDEBUG,fileA In the properties File for application B : log4j.logger.de.test.webappB.util=3DDEBUG,fileB IIRC, they should not the same, for Log4j share a global configuration. Ivan 2009/4/7 Jochen Zink > Hello, > > we use geronimo 2.1.1. For Logging, we use Log4j and the log4j Plugin. > > We have two Webapplications (WebApp A and WebApp B) running. Both use a > "util.jar". > > If we deployApplication A before application B, Application A logs into > Application Bs logfile. If we deploy first application B, application B l= ogs > into application As logfile. > > I guess, this is related to the equal package name from util.jar. > > Is there a possibility to avoid this? > > Here is geronimo-web.xml (plugin part) for application A. Application Bs = is > equal. Only the properties name is different. > class=3D"org.apache.geronimo.system.logging.log4j.ApplicationLog4jConfigu= rationGBean"> > var/log/applicationA.properties > > ServerInfo > > > > > And here is the content of the log4j properties File for application A. > This is equal to application Bs properties. Only fileA changed to fileB a= nd > so on. > > log4j.appender.fileA=3Dorg.apache.log4j.DailyRollingFileAppender > log4j.appender.fileA.threshold=3DDEBUG > > log4j.appender.fileA.file=3D${org.apache.geronimo.server.dir}/var/log/app= A.log > log4j.appender.fileA.layout=3Dorg.apache.log4j.PatternLayout > log4j.appender.fileA.layout.ConversionPattern=3DApplication A: %d{dd.MM.y= yyy, > HH:mm:ss} %p (%c:%L) %m%n > > log4j.logger.de.test.webapp.util=3DDEBUG,fileA > log4j.logger.de.test.webapplicationA=3DDEBUG,fileA > log4j.additivity.de.webapp.util=3Dfalse > log4j.additivity.de.webapplicationA=3Dfalse > > > Thanks a lot! > Regards > Jochen > > ____________________________________________________________________ > Psssst! Schon vom neuen WEB.DE MultiMessenger geh=F6rt? > Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3D3123 > > --=20 Ivan --00163646d7d47953c10466f77252 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Are the application A has the same package names with the package B ?
I = mean
In the properties File for application A :
log4j.logger.de.test= .webapp.util=3DDEBUG,fileA

In the properties File for application B = :
log4j.logger.de.test.webappB.util=3DDEBUG,fileB

IIRC, they should no= t the same, for Log4j share a global configuration.
=A0=A0=A0 Ivan
2009/4/7 Jochen Zink <jochenlist@web.de>
Hello,

we use geronimo 2.1.1. For Logging, we use Log4j and the log4j Plugin.

We have two Webapplications (WebApp A and WebApp B) running. Both use a &qu= ot;util.jar".

If we deployApplication A before application B, Application A logs into App= lication Bs logfile. If we deploy first application B, application B logs i= nto application As logfile.

I guess, this is related to the equal package name from util.jar.

Is there a possibility to avoid this?

Here is geronimo-web.xml (plugin part) for application A. Application Bs is= equal. Only the properties name is different.
<gbean name=3D"DirectoryLog4jConfiguration" class=3D"org.= apache.geronimo.system.logging.log4j.ApplicationLog4jConfigurationGBean&quo= t;>
=A0 =A0<attribute name=3D"log4jFile">var/log/applicationA.= properties</attribute>
=A0 =A0 =A0 =A0<reference name=3D"ServerInfo">
=A0 =A0 =A0 =A0 =A0 =A0<name>ServerInfo</name>
=A0 =A0 =A0 =A0</reference>
=A0</gbean>


And here is the content of the log4j properties File for application A. Thi= s is equal to application Bs properties. Only fileA changed to fileB and so= on.

log4j.appender.fileA=3Dorg.apache.log4j.DailyRollingFileAppender
log4j.appender.fileA.threshold=3DDEBUG
log4j.appender.fileA.file=3D${org.apache.geronimo.server.dir}/var/log/appA.= log
log4j.appender.fileA.layout=3Dorg.apache.log4j.PatternLayout
log4j.appender.fileA.layout.ConversionPattern=3DApplication A: %d{dd.MM.yyy= y, HH:mm:ss} %p (%c:%L) %m%n

log4j.logger.de.test.webapp.util=3DDEBUG,fileA
log4j.logger.de.test.webapplicationA=3DDEBUG,fileA
log4j.additivity.de.webapp.util=3Dfalse
log4j.additivity.de.webapplicationA=3Dfalse


Thanks a lot!
Regards
Jochen

____________________________________________________________________
Psssst! Schon vom neuen WEB.DE<= /a> MultiMessenger geh=F6rt?
Der kann`s mit allen:
http://www.produkte.web.de/messenger/?did=3D3123=




--
Ivan
--00163646d7d47953c10466f77252--