How to limit Tomcat log sizes in SUSE Manager

This document (000020406) is provided subject to the disclaimer at the end of this document.


SUSE Manager 4.x Server


Tomcat access logs are not limited by default, and may grow continuously. Eventually, this could fill up the partition.

The log files can be found at /var/log/tomcat, and are named "localhost_access_log.<date in ISO format>.txt" 


In the "/etc/tomcat/server.xml" file, look for these lines near the end:
 <!-- Access log processes all example.
     Documentation at: /docs/config/valve.html
     Note: The pattern used is equivalent to using pattern="common" -->
 <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b"/>

Include a "maxDays" field just before the closing "/>" tag:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" maxDays="7" />

In this case, we're limiting the access logs to 7 days. Adjust as needed for your environment.

Restart the services to pick up the change:
# spacewalk-service restart


Tomcat access logs use a different log mechanism than the usual system logs. These are not picked up by the system logrotate daemon.


This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020406
  • Creation Date: 05-Oct-2021
  • Modified Date:06-Oct-2021
    • SUSE Manager for Retail
    • SUSE Manager Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center