How to automatically purge old web server logs
search cancel

How to automatically purge old web server logs

book

Article ID: 220031

calendar_today

Updated On:

Products

CA Workload Automation AE

Issue/Introduction

How to automatically purge old web server logs

Environment

Release : 12

Component : CA Workload Automation AE (AutoSys)

Cause

Configuration

Resolution

We can modify the $AUTOUSER/webserver/conf/server.xml as shown below to retain rotated access logs before being deleted based on max days .

 <!-- 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="/opt/CA/WorkloadAutomationAE/autouser.ACE/out" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="waae_webservices_access_log"  maxDays="3" suffix=".log"/>


For more information please check the below link:
https://tomcat.apache.org/tomcat-8.5-doc/config/valve.html