tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric B." <ebe...@hotmail.com>
Subject Re: swallowOutput not working properly?
Date Thu, 13 Aug 2009 19:47:42 GMT
"Eric B." <ebenze@hotmail.com> wrote in message 
news:h61n91$r1q$1@ger.gmane.org...

> I tried using the swallowOutput in my <context> object definition, but am
> getting some really weird results from it.  My webapp uses log4j to do its
> logging with its own log4j.xml file within the webapp, and all log4j's 
> output is
> defined as using the org.apache.log4j.ConsoleAppender.
>
> Based on that configuration (and swallowOutput documentation) I would 
> expect that all logging from my root context would therefor go through 
> 6root.org.apache.juli.FileHandler log file.  However, I seem to only be 
> getting some logging captured in the root.log logfile.
>
> It is extremely confusing; there doesn't seem to be any pattern.  Some 
> webapp logs go to root.log, other still are displayed on stdout, and 
> therefore in catalina.out.  Like I said, all log msgs in the webapp use 
> the same log4j ConsoleAppender.

I've dug around a little more, and I seem to see a bit of a pattern. 
Struts2 logs seem to be swallowed (my logs entries from 
org.apache.struts2.config.BeanSelectionProvider are in the root.log file), 
and loggers that are defined in my webapp's filters seem to be swallowed as 
well.  However, nothing from the webapp itself.

I found a thread from mid June 2009 about this and timing between when 
Tomcat replaces the System.out and System.err streams, so I manually 
launched my webapp from the manager once Tomcat was up and initialized, but 
it made no difference either.  And my results seem to be repeatable; 
evertime I restart Tomcat and/or my webapp, it is the same filters that 
manage to get swallowed, but nothing else from the webapp.

Any thoughts, suggestions, advice?

Thanks,

Eric




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message