正在删除 wso2 API 管理器中的 http_access_yyyy_mm_dd.log 文件

Removeing http_access_yyyy_mm_dd.log file in wso2 API Manager

我对 API 经理有一个问题。

我不想在 API 管理器中有请求和响应的日志,因为那些日志文件太大了,我遇到了 20G 的文件。我试图评论 Catalina 访问文件,它位于 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"/>

不幸的是,注释完上面的代码后,只有 http_access_.log 文件没有创建,但是创建了 http_access_yyyy_mm_dd.log 并在其中保存了请求。我也尝试更改上述文件的目录。只有文件 http_access_.log 保存在新目录中,并且 http_access_yyyy_mm_dd.log 仍然在 ${carbon.home}/repository/logs 目录中创建。

如何在 wso2 API 管理器中更改 http_access_yyyy_mm_dd.log 的配置?

根据 Apache Documentation,

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

您可以简单地注释掉您提到的可以在 <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"/>

在提到的文件路径中简单注释上面的代码片段并重新启动 WSO2 APIM 服务器。