tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felipe Jaekel <fkjae...@gmail.com>
Subject Re: Limit log files rotation
Date Tue, 05 Mar 2013 17:40:34 GMT
Thanks for the link.

Searching a bit more I found this:
http://www.queuemetrics.com/manuals/QM_AdvancedConfig-chunked/ar01s17.html

Simple to setup, but anyway it would be nice if Tomcat could do this out of
the box, since the server can crash if it runs out of disk space.


2013/3/5 Daniel Mikusa <dmikusa@vmware.com>

> On Mar 5, 2013, at 8:54 AM, Felipe Jaekel wrote:
>
> > Hi,
> >
> > I'd like to limit log rotation to a specific number of days to avoid that
> > the logs folder keep growing indeterminately.
>
> Which log files are you referring to?  Including the names would help.
>
> >
> > Tried to google about, people say to study Log4j or use crontab,
> > but isn't there an easier way like a *maxHistory* property?
>
> Tomcat's default logging mechanism will simply rotate files.  It does not
> perform any cleanup or archival.
>
> If you want those features, you have two choices …
>
> 1.) Setup a cron job to cleanup or archive old log files.
> 2.) Use Tomcat's log4j support.  Log4j supports cleanup and archival.
>
>   https://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j
>
> There's probably other things you can do as well.  Those are just the
> first two that popped into my head.
>
> Dan
>
> >
> > Thanks,
> > Phillip
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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