1

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?

Ralf
  • 16,086
  • 4
  • 44
  • 68

1 Answers1

0

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.

Saad Sahibjan
  • 300
  • 1
  • 6
  • Thank you so much. I tested it more. It works in APIM, but in distributed APIM, it didn't work. I disabled it through logging configuration form. There is not any access files, anymore. – Atousa Mirhosseini Aug 20 '18 at 11:06