Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 770 invoked from network); 21 May 2007 13:21:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 May 2007 13:21:32 -0000 Received: (qmail 4458 invoked by uid 500); 21 May 2007 13:21:27 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 4059 invoked by uid 500); 21 May 2007 13:21:25 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 4048 invoked by uid 99); 21 May 2007 13:21:25 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2007 06:21:25 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=RCVD_IN_SORBS_WEB X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [213.129.248.92] (HELO debian) (213.129.248.92) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2007 06:21:19 -0700 Received: from [81.132.143.193] by debian (Axigen) with ESMTPA id 265F00; Mon, 21 May 2007 14:44:21 +0200 From: "Marc Rameder" To: "'Tomcat Users List'" Subject: AW: AW: logging log4j of my application Date: Mon, 21 May 2007 14:21:00 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 In-Reply-To: <465196A8.6010601@kippdata.de> Thread-Index: AcebojkzP2o93mW9Q6y5jLG8k/lo3AABXi0g X-AxigenSpam-Level: 6 X-Virus-Checked: Checked by ClamAV on apache.org Message-Id: <20070521132119.8C6C510FB036@herse.apache.org> The output of the log file should be information about hibernate, spring = and my development in the net.thefource package.=20 I have used this log4j.properties for a GUI application where it is = working fine and also by testing the server with JUnit all debug information are displayed. I am starting the tomcat with the startup.bat. Hence it is not a = service. A example for the GUI application would be: 14:07:25,500 () [INFO ] CollectionFactory () - JDK 1.4+ = collections available=20 marc log4j.rootLogger=3DDEBUG,FILE #ConsoleAppender log4j.appender.CONSOLE=3Dorg.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.layout=3Dorg.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=3D%d{HH:mm:ss,SSS} (%x) = [%-5p] %c{1} (%M) - %m%n #FileAppender log4j.appender.FILE=3Dorg.apache.log4j.FileAppender log4j.appender.FILE.layout=3Dorg.apache.log4j.PatternLayout log4j.appender.FILE.layout.ConversionPattern=3D%d{HH:mm:ss,SSS} (%x) = [%-5p] %c{1} (%M) - %m%n log4j.appender.FILE.File=3D${catalina.home}/logs/RPSSERVER.log log4j.appender.FILE.File.MaxFileSize=3D1MB # Keep one backup file log4j.appender.FileApp.MaxBackupIndex=3D1 log4j.appender.FileApp.layout=3Dorg.apache.log4j.PatternLayout log4j.appender.FileApp.layout.ConversionPattern=3D%d{HH:mm:ss,SSS} (%x) = [%-5p] %c{1} (%M) - %m%n =20 log4j.logger.org.apache.catalina=3DWARN, CONSOLE log4j.logger.org.apache.catalina.core=3DWARN, CONSOLE log4j.logger.org.apache.catalina.session=3DWARN, CONSOLE log4j.logger.net.thefource=3DDEBUG ,CONSOLE log4j.logger.org.apache.commons=3DWARN, CONSOLE log4j.logger.org.hibernate=3DINFO, CONSOLE log4j.logger.org.hibernate.type=3DINFO, CONSOLE log4j.logger.org.springframework=3DINFO, CONSOLE -----Urspr=FCngliche Nachricht----- Von: Rainer Jung [mailto:rainer.jung@kippdata.de]=20 Gesendet: Montag, 21. Mai 2007 13:55 An: Tomcat Users List Betreff: Re: AW: logging log4j of my application All right, so we assume, there are no log4j things lying around in your=20 Tomcat apart from your webapp. Also please check, that the running=20 Tomcat process has no -Dlog4j.configuration in its commandline. It could be, that you have a servlet initialization, that configures=20 log4j via its API, but let's assume this is not the case. Then even without the context-param, the log4j.properties in your=20 WEB-INF/classes should be found as the default configuration. Maybe the=20 context-param is an indicator, that there is explicit log4j=20 initialization code in your webapp and you are not using = autoconfiguration. In both cases we assume it really picks up the=20 WEB-INF/classes/log4j.properties. So if a file gets created but nothing gets logged into it, we should=20 have a look at the contents of the log4j.properties file. You should=20 post it. Also: which messages would you expect there? Regards, Rainer Marc Rameder wrote: > I deploy a war file with the following content. > WEB-INF: > classes: > contains the log4j.properties file in the root directory. Only > one exists. > lib: > contains the log4j-1.2.9.jar not in any other directory >=20 > my web.xml contains >=20 > > log4jConfigLocation > classpath:log4j.properties > >=20 > I hope that's the information you ask for! > thanks > marc >=20 > -----Urspr=FCngliche Nachricht----- > Von: Rainer Jung [mailto:rainer.jung@kippdata.de]=20 > Gesendet: Montag, 21. Mai 2007 13:27 > An: Tomcat Users List > Betreff: Re: logging log4j of my application >=20 > How do you deploy the log4j Jar? Which place? Several places? >=20 > Where do you keep your log4j configuration file? One file, several = ones? >=20 > Which mechanism did you choose to publish the files to log4j? >=20 > The questions concerning "several" always mean: are those things only = in=20 > your webapp, or also added to the container installation? >=20 > Depending on the answers, it's relatively easy (after understanding=20 > tomcat class loaders and log4j default configuration mechanisms) to=20 > explain, which config gets evaluated and why. >=20 > Regards, >=20 > Rainer >=20 > Marc Rameder wrote: >> Hi >> >> I have a problem with tomcat 5.5.20. My application uses log4j 1.2.9 = and I >> am sure that all my implementation is correct because I uses JUnit = and the >> logging works fine with it. However, Tomcat loads my log4j.properties = so > the >> configuration of the web.xml should be right.=20 >> I know that because the log file is created but it contains no = entries. >> Moreover my log4j.properties is used in other projects without tomcat = and >> works file.=20 >> =20 >> Is there a special configuration of the tomcat? >> >> Thanks >> marc --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org