tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Yet another swallowOutput question
Date Mon, 28 Sep 2009 05:14:40 GMT
Vinicius Carvalho wrote:
> Hello Mark. We have removed from all hosts the swallowOutput and add
> it to the context section of each host. We have also added it to the
> conf/context.xml.
> 
> Yet, the catalina.out keeps growing. We found that some apps, that are
> using System.out/System.err, have their output redirected to
> catalina.out. Also, since we put log4j on our classpath, and
> configured a properties file for tomcat,

Phrases like "added to the classpath" always worry me slightly as the classpath
is something that in 99.9% if cases is best left alone.

> now some apps are outputing
> very verbose logs (DEBUG) to the catalina.out. Those came from ibatis,
> that from some reason (we are checking the sources, but may take a
> while) believes that the log4j is set to DEBUG.
> 
> My first guess is to believe that maybe those apps have a logging
> configuration using DEBUG with a console appender, and that is being
> redirected to catalina.out, would be this the issue?
> 
> We are generating several gigabytes of log per day, requesting us to
> almost remove the log manually each 3-4 days.
> 
> Any ideas?

Fix the apps / raise a bug against the libraries.

Tomcat does what it can given the circumstances but swallowOutput is not a
panacea for apps/libraries with broken logging.

I'm fairly sure that the log4j output isn't going to get trapped by the
swallowOutput option.

Regards,

Mark

> 
> Regards
> 
> On Wed, Sep 23, 2009 at 10:20 AM, Mark Thomas <markt@apache.org> wrote:
>> Vinicius Carvalho wrote:
>>> Thanks Mark, do I have to set it for each context I have? I'm using
>>> several Hosts with few contexts on each.
>> Yes, but there is a short-cut. Set it in CATALINA_BASE/conf/context.xml
>> and it should apply to all contexts on that instance.
>>
>> Mark
>>
>>> Regards
>>>
>>> On Fri, Sep 18, 2009 at 4:18 PM, Mark Thomas <markt@apache.org> wrote:
>>>> Vinicius Carvalho wrote:
>>>>> Hello there! I'm trying to redirect some legacy System.out calls in
>>>>> our app to a different logger. Since tomcat's logging implementation
>>>>> does not allow one to configure the maximum size of the catalina.out,
>>>>> we are easily reaching gigabytes of space on that file.
>>>>>
>>>>> I thought that by just adding:
>>>>>
>>>>>  <Host name="localhost"  appBase="webapps"
>>>>>             unpackWARs="true" autoDeploy="true"
>>>>>             xmlValidation="false" xmlNamespaceAware="false"
>>>>> swallowOutput="true">
>>>>>
>>>>> Would solve my problems, but, after re-starting the server and calling
>>>>> a servlet that deliberate calls system.out, the catalina out gets all
>>>>> the output
>>>> Unsurprising, given that swallowOutput is not a valid attribute for a
>>>> Host element. You want Context.
>>>>
>>>> Mark
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


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


Mime
View raw message