如何更改 WSO2 中 wso2api/repository/logs 目錄下 http_access_.log 文件中的日誌模式 (How to change log pattern in http_access_.log file under the directory wso2api/repository/logs in WSO2)


問題描述

如何更改 WSO2 中 wso2api/repository/logs 目錄下 httpaccess.log 文件中的日誌模式 (How to change log pattern in httpaccess.log file under the directory wso2api/repository/logs in WSO2)

我在 catalina 服務器 xml 文件中更新了以下配置。

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

我所做的任何更改(模式、目錄路徑)都會影響文件 http_access_Date.log 文件,但不影響 http_access_.log 文件。

請提供任何建議。

API 執行日誌記錄到 http_access_.log 文件。如何管理這個文件和這個文件中的模式?


參考解法

方法 1:

http_acccess_.log file contains passthrough and NIO transport traffic‑related logs, and that is not configured via the above tomcat valve.

For that, you need to update log4j.properties file like this.

log4j.logger.org.apache.synapse.transport.http.access=INFO

and the access‑log.properties like this.

access_log_pattern=%h %l %u %t "%r" %s %b "%{Referer}i" "%{User‑Agent}i"

See this doc for more details.

https://docs.wso2.com/display/EI611/Monitoring+ESB+Access+Logs#MonitoringESBAccessLogs‑ConfiguringaccesslogsforthePassThroughandNIOtransports(Service/APIinvocation)

(by AnandBee)

參考文件

  1. How to change log pattern in httpaccess.log file under the directory wso2api/repository/logs in WSO2 (CC BY‑SA 2.5/3.0/4.0)

#wso2-enterprise-integrator #wso2-api-manager #wso2






相關問題

WSO2 EI 和節點 JS (WSO2 EI and NODE JS)

在我的本地計算機上重建 WSO2 存儲庫的正確順序 (The correct order to rebuild the WSO2 repositories on my local computer)

如何為 WSO2 EI 代理服務配置 HTTP 基本身份驗證 (How to Configure HTTP Basic Auth for WSO2 EI proxy service)

WSO2 EI 6.5 - 名稱或服務未知 | DefaultAddressPicker [LOCAL] [wso2.ei.domain] [3.5.4] 集成商名稱或服務未知 (WSO2 EI 6.5 - Name or service not known | DefaultAddressPicker [LOCAL] [wso2.ei.domain] [3.5.4] integrator Name or service not known)

如何更改 WSO2 中 wso2api/repository/logs 目錄下 http_access_.log 文件中的日誌模式 (How to change log pattern in http_access_.log file under the directory wso2api/repository/logs in WSO2)

WSO2 - 無法將ViaPost 發送到 url (WSO2 - Unable to sendViaPost to url)

WSO2 ESB:如何處理端點返回的內部錯誤 (WSO2 ESB: How to handle internal error returned by an endpoint)

WSO2 ESB:無法從註冊表加載數據庫連接屬性 (WSO2 ESB: Unable to load DB connection properties from registry)

添加連接器 WSO2 Enterprise Integrator (Add connectors WSO2 Enterprise Integrator)

我可以在 Enterprise Integrator 6.6.0 WSO2 中添加外部 swagger api 文檔嗎? (Can I add an external swagger api document in Enterprise Integrator 6.6.0 WSO2?)

WSO2 APIM 和 EI 是否支持 API 刪除現有租戶? (Does WSO2 APIM and EI support API to delete an existing tenant?)

WSO2 ESB 7.1.0 二進制響應被截斷為 375B (WSO2 ESB 7.1.0 Binary response is truncated to 375B)







留言討論