Skip to main content
Planview Customer Success Center

How do I only keep the last two weeks of Tomcat logs?

Last Updated:    |  Applicable Hub Versions: All

Answer

Hub only rolls over the tasktop*log files based on the log4j.xml settings, and by default that is for a 2 week timespan. There are other Tomcat and Keycloak logs that are not managed in this way and will continue to grow.

In Linux, these logs can easily be cleaned up by using a cron job and the find command (similar to the command listed below) to delete logs older than 14 days:

43 10 * * 4 /usr/bin/find /opt/tasktop/tasktop-17.4.3/logs -mtime +14 -delete > deleteoldlogs 2>&1