啟用偵錯記錄

Edge for Private Cloud 4.18.01 版

您可以為多個 Edge 元件啟用偵錯記錄功能。啟用偵錯記錄後,元件會將偵錯訊息寫入 system.log 檔案。

舉例來說,如果您為 Edge 路由器啟用偵錯記錄檔功能,路由器會將偵錯訊息寫入:

/opt/apigee/var/log/edge-router/logs/system.log

使用下列 API 呼叫,為元件啟用偵錯記錄檔功能:

curl -X POST "http://localhost:PORT/v1/logsessions?session=debug"

如何停用偵錯記錄檔功能:

curl -X DELETE "http://localhost:PORT/v1/logsessions/debug"

如要查看進行中的偵錯記錄工作階段,請按照下列步驟操作:

curl -X GET "http://localhost:PORT/v1/logsessions/debug"

每個支援偵錯記錄檔的 Edge 元件,在 API 呼叫中使用的通訊埠編號都不同,如下表所示:

構成要素

通訊埠

記錄檔

管理伺服器 8080 /opt/apigee/var/log/edge-management-server/logs/system.log
路由器 8081 /opt/apigee/var/log/edge-router/logs/system.log
訊息處理器 8082 /opt/apigee/var/log/edge-message-processor/logs/system.log
Qpid 伺服器 8083 /opt/apigee/var/log/edge-qpid-server/logs/system.log
Postgres 伺服器 8084 /opt/apigee/var/log/edge-postgres-server/logs/system.log

啟用 Edge SSO 的偵錯記錄檔功能

如要啟用 Edge SSO 的偵錯記錄檔功能,請按照下列步驟操作:

  1. 編輯 /opt/apigee/customer/application/sso.properties 檔案 (如果檔案不存在,請建立檔案):
    > vi /opt/apigee/customer/application/sso.properties
  2. 設定下列屬性並儲存檔案:
    conf_logback_log_level=DEBUG
  3. 重新啟動 Edge SSO:
    > /opt/apigee/apigee-service/bin/apigee-service edge-sso restart