I didn't get it : Are you trying to get tomcat internal log to be logged
somewhere
or are we talking about your application's logs?
Evgeny

On Tue, Oct 20, 2009 at 12:42 AM, larrydlefever <larrydlefe...@gmail.com>wrote:

>
> 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-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to