tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: [somewhat OT] Clearing the catalina.out file
Date Fri, 14 Aug 2009 23:27:51 GMT
Eric B. wrote:
>> I have some suggestions to those who are concerned about catalina.out:
>> 1. Just don't write to stdout. Tomcat produces very little output
>>   to stdout. Your web application can avoid doing it. Finally,
>>   Tomcat provides a "swallowOutput" option for webapps so that
>>   System.out and System.err end up writing to configurable loggers
>>   that can be redirected to other files (potentially rotated by
>>   smarter logging mechanisms than shell redirection).
> I don't know if you have seen my other post about this, but swallowOutput 
> seems to be a little flaky in its implementation.  Although I have it 
> enabled for my context, only _some_ of the std out from the context gets 
> redirected properly.  I tried searching thru the Tomcat source code to see 
> where this magic happens and to see if I can catch where the problem lies, 
> but got miserably lost looking at any source that relates to swallowOutput.

It is handled in SystemLogHandler. For example usage, look at the
StandardWrapper and the calls it makes to SystemLogHandler. For how it
is set up, look at the Embedded class.

> So I would tread lightly if wanting to use swallowOutput; I'm not convinced 
> that it is working perfectly.

I think I know what is going on. I'll post to your other thread.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message