Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 71885 invoked from network); 14 Feb 2003 18:25:06 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 14 Feb 2003 18:25:06 -0000 Received: (qmail 2864 invoked by uid 97); 14 Feb 2003 18:26:39 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 2857 invoked from network); 14 Feb 2003 18:26:39 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 14 Feb 2003 18:26:39 -0000 Received: (qmail 66361 invoked by uid 500); 14 Feb 2003 18:23:53 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 66306 invoked from network); 14 Feb 2003 18:23:52 -0000 Received: from www.shareowner.com (HELO shareowner.com) (66.46.24.147) by daedalus.apache.org with SMTP; 14 Feb 2003 18:23:52 -0000 Received: from exchange.int.shareowner.com ([66.46.24.163]) by shareowner.com (8.11.6/8.11.6) with ESMTP id h1EI8Dd15350 for ; Fri, 14 Feb 2003 13:08:13 -0500 Received: by exchange.int.shareowner.com with Internet Mail Service (5.5.2653.19) id ; Fri, 14 Feb 2003 13:23:50 -0500 Message-ID: From: pqin@shareowner.com To: tomcat-user@jakarta.apache.org Subject: RE: Log4J and tomcat using Commons logging Date: Fri, 14 Feb 2003 13:23:49 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C2D456.37EED470" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C2D456.37EED470 Content-Type: text/plain According to commons-logging documentation, commons-logging automatically search for available logging config, log4j, jdk, commons-logging, simplelog etc. The idea is good. It makes life much easier using different logging api. I am happy with log4j so why switch? Regards, PQ "This Guy Thinks He Knows Everything" "This Guy Thinks He Knows What He Is Doing" -----Original Message----- From: Larry Meadors [mailto:Larry.Meadors@plumcreek.com] Sent: February 14, 2003 1:14 PM To: tomcat-user@jakarta.apache.org Subject: RE: Log4J and tomcat using Commons logging Hey Jim, Can you help me understand your configuration so I can help identify where the breakdown is? I am most curious about where all the jar files are - common/lib, shared/lib, or WEB-INF/lib? Probably the best info would be directory listings of common/lib, shared/lib, and WEB-INF/lib. I suspect that log4j is being loaded to far up the classloader tree to be able to find your configuration file when used through commons-logging, but when you use it directly, it is loaded again by another classloader that is able to find your configuration file. That is why I was asking if there was a way to tell log4j to use the properties file without relying on the class loader. I do not use log4j, so I do not know what it can do. Larry >>> jim.collins@uk.nomura.com 02/14/03 10:38 AM >>> Hi Larry, I am not having a problem with log4j I deploy the log4j.properties to myapp/WEB-INF/classes and it works fine. I would not want to have log4j.properies in common/classes because I want to be able to configure my logging for individaul apps. The problem is if I use commons-logging, this SHOULD use the underlying log4j implementation and the log4j.properties file that I have deployed with my app. With commons-logging you do not log to any particular logging implementation. Regards Jim. > -----Original Message----- > From: Larry Meadors [mailto:larry.meadors@plumcreek.com] > Sent: 14 February 2003 17:11 > To: tomcat-user@jakarta.apache.org > Subject: RE: Log4J and tomcat using Commons logging > > > I have never used log4j, but you might try putting the > log4j.properties > file in common/classes, it means all apps get the same log > settings, but > may work. :-/ > > Is there a way to tell log4j to use the properties file > without relying > on the class loader, like an environment variable or something? That > might make it easier to use. > > Larry > > >>> jim.collins@uk.nomura.com 02/14/03 09:55 AM >>> > Hi Larry, > > There have been some problems with the location of the commons-logging > jar > file. It was in server/lib but this causes intermittent problems that > causes > Tomcat to crash. I have posted this problem to this mail list and the > same > problem has been published on other mail lists. The fix is to move > commons-logging.jar from server/lib to common/lib and not to deploy > commons-logging with your webapp. At the moment I have > commons-logging.jar > only in common/lib and the log4j jar file in common/lib and my apps > WEB-INF/lib dir. If I log directly to log4j it uses my > log4j.properties > file > but if I use commons-logging it uses the default. > > For the moment I will stick to calling log4j directly. It > would be nice > to > clear this up though as a lot of other people are having the same > problem > trying to use commons-logging. > > Regards > > Jim. > > > -----Original Message----- > > From: Larry Meadors [mailto:larry.meadors@plumcreek.com] > > Sent: 14 February 2003 15:40 > > To: tomcat-user@jakarta.apache.org > > Subject: RE: Log4J and tomcat using Commons logging > > > > > > Where are your commons-logging and log4j jars? > > > > If they are loaded by a different classloader than the > > log4j.properties > > file, it may not work. > > > > Larry > > > > >>> jim.collins@uk.nomura.com 02/14/03 02:47 AM >>> > > Hi, > > > > I have managed to get log4j to work for my webapps. I just have a > > log4j.properties file in WEB-INF/classes and it works. I can't get > > commons-logging to work though. If I try commons-logging it does not > > pick up > > my log4j.properties file yet using log4j directly does pick > > up the file. > > > > I have spent a lot of time trawling Tomcat/Struts/Commons > > mail archives > > to > > try and find how to get this to work to no avail. Reading these mail > > archives I can see that a lot of other people are having the same > > problem as > > me. > > > > As Tomcat and Struts uses commons-logging could someone > please try and > > clarify how we set up a webapp to use commons-logging with its own > > configuration file. I am sure this would prove useful to a > > large number > > of > > users. > > > > Many thanks > > > > Jim. > > > > > -----Original Message----- > > > From: Shapira, Yoav [mailto:yoav.shapira@mpi.com] > > > Sent: 13 February 2003 18:11 > > > To: Tomcat Users List > > > Subject: RE: Log4J and tomcat > > > > > > > > > > > > Howdy, > > > FYI: we deploy in packed .war files (and have > > > unpackWARs="false" in the > > > elements of server.xml). We use log4j with a properties > > > configuration file. The way we configure log4j is in a servlet > > > listener's contextInitialized(ServletContext sce) method, using > > > URL configurationFileUrl = > > > sce.getServletContext().getResource("/WEB-INF/config/log4j.prop"); > > > PropertyConfigurator.configure(configurationFileUrl); > > > > > > This works from wars, unpacked wars, etc. > > > > > > Yoav Shapira > > > Millennium ChemInformatics > > > > > > > > > >-----Original Message----- > > > >From: Sloan Seaman [mailto:sloan@sgi.net] > > > >Sent: Thursday, February 13, 2003 1:03 PM > > > >To: Tomcat Users List > > > >Subject: Re: Log4J and tomcat > > > > > > > >I'll keep you posted if I ever figure something out. > > > > > > > >The problem prob. is that since the common-logging and log4j > > > use a lot > > > of > > > >static objects I'm getting what tomcat has already set up > > (this is a > > > theory > > > >mind you).... > > > > > > > >----- Original Message ----- > > > >From: "tomcat guy" > > > >To: "Tomcat Users List" > > > >Sent: Thursday, February 13, 2003 12:57 PM > > > >Subject: Re: Log4J and tomcat > > > > > > > > > > > >> Sloan, sorry can't help you out but if you find a > solution I'd be > > > >interested > > > >> in how you came up with the fix... Learnin about log4j it > > > could help > > > in > > > >the > > > >> future.... > > > >> > > > >> ----- Original Message ----- > > > >> From: "Sloan Seaman" > > > >> To: > > > >> Sent: Wednesday, February 12, 2003 3:23 PM > > > >> Subject: Log4J and tomcat > > > >> > > > >> > > > >> > I'm deploying a war file using tomcat and I wish to > > use Apache's > > > common > > > >> > logging api to log things (log4j behind the scenes). > > > >> > > > > >> > For some reason my configuration file seems to be > > getting ignored > > > but > > > >my > > > >> > log.info msgs are showing up in the console window > for Tomcat. > > > >> > > > > >> > Can someone tell me why this is happening? > > > >> > > > > >> > How do I get my app to use my log4j conf file? > > > >> > > > > >> > Thanks! > > > >> > -- > > > >> > Sloan > > > >> > > > > >> > > > > >> > > > > >> > > > > > > > --------------------------------------------------------------------- > > > >> > To unsubscribe, e-mail: > > > tomcat-user-unsubscribe@jakarta.apache.org > > > >> > For additional commands, e-mail: > > > tomcat-user-help@jakarta.apache.org > > > >> > > > > >> > > > >> > > > >> > > > > > > --------------------------------------------------------------------- > > > >> To unsubscribe, e-mail: > > tomcat-user-unsubscribe@jakarta.apache.org > > > >> For additional commands, e-mail: > > > tomcat-user-help@jakarta.apache.org > > > >> > > > >> > > > > > > > > > > > > > > >--------------------------------------------------------------------- > > > >To unsubscribe, e-mail: > tomcat-user-unsubscribe@jakarta.apache.org > > > >For additional commands, e-mail: > > tomcat-user-help@jakarta.apache.org > > > > > > > > > > > > > > > This e-mail, including any attachments, is a confidential > > > business communication, and may contain information that is > > > confidential, proprietary and/or privileged. This e-mail is > > > intended only for the individual(s) to whom it is addressed, > > > and may not be saved, copied, printed, disclosed or used by > > > anyone else. If you are not the(an) intended recipient, > > > please immediately delete this e-mail from your computer > > > system and notify the sender. Thank you. > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > > For additional commands, e-mail: > tomcat-user-help@jakarta.apache.org > > > > > > > > > PLEASE READ: The information contained in this email is confidential > > and intended for the named recipient(s) only. If you are not > > an intended > > recipient of this email you must not copy, distribute or take any > > further action in reliance on it and you should delete it and > > notify the > > sender immediately. Email is not a secure method of > communication and > > Nomura International plc cannot accept responsibility for > the accuracy > > or completeness of this message or any attachment(s). Please examine > > this > > email for virus infection, for which Nomura International > plc accepts > > no responsibility. If verification of this email is sought > then please > > request a hard copy. Unless otherwise stated any views or opinions > > presented are solely those of the author and do not > represent those of > > Nomura International plc. This email is intended for informational > > purposes only and is not a solicitation or offer to buy or sell > > securities or related financial instruments. Nomura > > International plc is > > regulated by the Financial Services Authority and is a member of the > > London Stock Exchange. > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > > > > PLEASE READ: The information contained in this email is confidential > and intended for the named recipient(s) only. If you are not > an intended > recipient of this email you must not copy, distribute or take any > further action in reliance on it and you should delete it and > notify the > sender immediately. Email is not a secure method of communication and > Nomura International plc cannot accept responsibility for the accuracy > or completeness of this message or any attachment(s). Please examine > this > email for virus infection, for which Nomura International plc accepts > no responsibility. If verification of this email is sought then please > request a hard copy. Unless otherwise stated any views or opinions > presented are solely those of the author and do not represent those of > Nomura International plc. This email is intended for informational > purposes only and is not a solicitation or offer to buy or sell > securities or related financial instruments. Nomura > International plc is > regulated by the Financial Services Authority and is a member of the > London Stock Exchange. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > PLEASE READ: The information contained in this email is confidential and intended for the named recipient(s) only. If you are not an intended recipient of this email you must not copy, distribute or take any further action in reliance on it and you should delete it and notify the sender immediately. Email is not a secure method of communication and Nomura International plc cannot accept responsibility for the accuracy or completeness of this message or any attachment(s). Please examine this email for virus infection, for which Nomura International plc accepts no responsibility. If verification of this email is sought then please request a hard copy. Unless otherwise stated any views or opinions presented are solely those of the author and do not represent those of Nomura International plc. This email is intended for informational purposes only and is not a solicitation or offer to buy or sell securities or related financial instruments. Nomura International plc is regulated by the Financial Services Authority and is a member of the London Stock Exchange. --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org ------_=_NextPart_001_01C2D456.37EED470--