tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 郑翼羽 <ground...@gmail.com>
Subject Re: How to split the default stdout log?
Date Tue, 06 Jul 2010 13:48:24 GMT
Thanks.

The bad news is all the output codes are in a single webapp, and have no
hope to use log4j instead of the current "system.out" codes.

Just I hope to find a way that can make tomcat generate a stdout.log file
eveyday, or at any interval.



On Tue, Jul 6, 2010 at 8:51 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: 郑翼羽 [mailto:groundzyy@gmail.com]
> > Subject: Re: How to split the default stdout log?
> >
> > But when tomcat5 starts, it will generate a file like
> > stdout_yyyymmdd.log, but when it runs for a couple of
> > days, there will be only one file
>
> Not sure there's going to be any ready way for Tomcat to fix sloppy webapp
> programming, but start with setting swallowOutput to true in the <Context>
> of interest (or in the global one).  This will divert stdout and stderr for
> each webapp to the webapp's logger.  You can then use log4j in the webapp,
> and make use of its built-in rotation capabilities.
>
> Look here for the doc:
> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
> http://tomcat.apache.org/tomcat-5.5-doc/logging.html
>
> You should also take a look at the FAQ entries on logging:
> http://wiki.apache.org/tomcat/FAQ/Logging
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>


-- 
郑翼羽

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message