tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Mikusa <>
Subject Re: Limit log files rotation
Date Tue, 05 Mar 2013 15:09:35 GMT
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.

There's probably other things you can do as well.  Those are just the first two that popped
into my head.


> Thanks,
> Phillip

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

View raw message