啟用偵錯記錄

私有雲 v4.18.01 的邊緣

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

舉例來說,如果您啟用邊緣路由器的偵錯記錄功能,路由器會將偵錯訊息寫入下列項目:

/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