How to limit Tomcat log sizes in SUSE Manager
This document (000020406) is provided subject to the disclaimer at the end of this document.
Environment
Situation
The log files can be found at /var/log/tomcat, and are named "localhost_access_log.<date in ISO format>.txt"
Resolution
<!-- 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 "%r" %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 "%r" %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
Cause
Disclaimer
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
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com