Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 87786 invoked from network); 19 Oct 2009 22:42:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Oct 2009 22:42:36 -0000 Received: (qmail 5820 invoked by uid 500); 19 Oct 2009 22:42:32 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 5755 invoked by uid 500); 19 Oct 2009 22:42:32 -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 5743 invoked by uid 99); 19 Oct 2009 22:42:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Oct 2009 22:42:31 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Oct 2009 22:42:28 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1N00vX-0005tn-Fs for users@tomcat.apache.org; Mon, 19 Oct 2009 15:42:07 -0700 Message-ID: <25966929.post@talk.nabble.com> Date: Mon, 19 Oct 2009 15:42:07 -0700 (PDT) From: larrydlefever To: users@tomcat.apache.org Subject: Tomcat 5.5 logging-config elegant? Not so much, I think. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: larrydlefever@gmail.com I just killed most of the afternoon trying (and failing) to get Tomcat 5.5 logging configured for just pretty basic sensible (to me, at least) output. I'm running Ubuntu. I installed Tomcat 5.5 via aptitude (the Ubuntu package-fetcher/installer). Symptoms: - a lingering System.out.println() (I know shouldn't use such -- but just knew I'd have trouble setting up logging -- and I was right): it's apparently getting "swallowed", though I don't see that "swallowOutput" option being set where I believe it's supposed to be set (per some forum-posts and such) - a Log statement set up using Commons Logging doesn't appear, though it's essentially immediately 'upstream' of what does appear (more about which in a moment) -- it's in the same method and there's no control-logic preventing it from executing - there's an ex.printStackTrace() whose output IS appearing in the catalina.out file -- or the one like it with the timestamp in it (not sure why there are two such) So, regarding application-specific logging, I'm apparently getting only what's automatically going to stderr. Solution-Efforts: - tried most obvious thing first: put the log4j jar into the webapp's WEB-INF/lib and log4j.properties into its WEB-INF/classes directories, tweaked my code to use Log4J explicitly as logger, changed one System.out.println() line to use that logger; result: no change - read about (rather hackish!) things to do 'upstream' (or: up the classloader-hierarchy) in the common/lib and common/classes directories; basically doing much as above but at that 'commons' directory-level; result: no change; maybe had yet to change the startup.sh script to set a -D option to point to my own log4j.properties file; might yet do so, though reluctant, since that's so damn hackish - read about and tried (even more hackish!) tricking the bootstrap code into thinking it's using commons-logging-api.jar when it's actually using the "full fledged" commons-logging.jar (along with associated change to my code to use commons-logging's classes rather than specifically those of Log4J): result: no change - incidently, each of these tests seemed to have the desired effect locally on my Windows laptop while running in Jetty rather than Tomcat I plan to continue with all this tomorrow, with a 'fresh head', but anything anybody might be able to tell me that might give me the needed "aha" moment with this would be much appreciated. Thanks. -- View this message in context: http://www.nabble.com/Tomcat-5.5-logging-config-elegant---Not-so-much%2C-I-think.-tp25966929p25966929.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org