wso2wso2-api-managerapi-manager

Removeing http_access_yyyy_mm_dd.log file in wso2 API Manager


I have one problem with API Manager.

I don't want to have logs of requests and responses in API Manager, because those log files are so big and I encounter files with 20G. I tried to comment Catalina access file, which is in repositoy/conf/tomcat/catalina-server.xml:

<Valve className="org.apache.catalina.valves.AccessLogValve" 
       directory="${carbon.home}/repository/logs"
       prefix="http_access_"
       suffix=".log"
       pattern="combined"/>

Unfortunately, after commenting the above code, only http_access_.log file didn't created, but http_access_yyyy_mm_dd.log was created and requests saved in it. I tried to change directory of above file, too. Only file http_access_.log saved in new directory, and http_access_yyyy_mm_dd.log is still created in the ${carbon.home}/repository/logs directory.

How can change configuration of http_access_yyyy_mm_dd.log in wso2 API Manager?


Solution

  • According to the Apache Documentation,

    The name of the file is composed by concatenation of the configured prefix, timestamp and suffix

    You can simply comment out the code snippet which you have mentioned which can be found in <PRODUCT_HOME>\repository\conf\tomcat\catalina-server.xml.

    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="${carbon.home}/repository/logs" prefix="http_access_" suffix=".log"b pattern="combined"/>
    

    In simple comment the above code snippet in the mentioned file path and restart the WSO2 APIM server.