How to disable the Spectrum OneClick Tomcat Access log

book

Article ID: 48601

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

The Access log could get huge and by default the log files are archived and not removed after every restart.
By default the log files are written into the $SPECROOT/tomcat/logs directory.
They are named like localhost_access_log.<Timestamp>.txt
Beside the possible configuration on the OneClick Client Log, how would you disable the Tomcat Access log completely?

Environment

Release: Any
Component:

Resolution

Before the logging get disable, please have a look on following Tomcat page and check what kind of information get collected on this log:

http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html#Access_Log_Valve

The logging can be disabled in the following way:

  • Go to %SPECROOT/tomcat/conf.
  • Make a copy of server.xml file.
  • Change following line of the server.xml:

    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false" />

    into:

    <!--<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false" /> -->

  • Restart OneClick Tomcat in order to make the change available.

 

This customization can get lost when you apply a new version of Spectrum or a patch that includes a new version of the server.xml file.

NOTE: Disabling this feature could make troubleshooting future issues more difficult.