根據預設,Edge 元件會使用 INFO 記錄層級。不過,您可以為每個 Edge 元件設定記錄層級。舉例來說,您可能會想將其設為「訊息處理器」的 DEBUG,或是「Management Server」的 ERROR。
可用的記錄層級包括:
ALLDEBUGERRORFATALINFOOFFTRACEWARN
如要設定元件的記錄層級,請編輯元件的屬性檔案來設定 conf_system_log.level 權杖,然後重新啟動元件:
- 在編輯器中開啟
/opt/apigee/customer/application/component_name.properties,其中 component_name 可以是下列其中之一:apigee-cassandra(Cassandra)apigee-openldap(OpenLDAP)apigee-postgresql(PostgreSQL 資料庫)apigee-qpidd(Qpidd)apigee-zookeeper(ZooKeeper)edge-management-server(管理伺服器)edge-management-ui(新版 Edge 使用者介面)edge-message-processor(訊息處理器)edge-postgres-server(Postgres 伺服器)edge-qpid-server(Qpid 伺服器)edge-router(邊緣路由器)
如果檔案不存在,請建立檔案。(如果是新版 Edge UI 元件
edge-management-ui,屬性檔案為/opt/apigee/customer/application/management-ui.properties;edge-management-ui-static僅包含靜態網頁資產,沒有屬性檔案)。 - 在屬性檔案中,將下列屬性設為所需的記錄層級。舉例來說,如要將其設為
DEBUG:conf_system_log.level=DEBUG
- 儲存檔案。
- 確認屬性檔案的擁有者為「apigee」使用者:
chown apigee:apigee /opt/apigee/customer/application/component_properties_file_name.properties
- 使用下列語法重新啟動元件:
/opt/apigee/apigee-service/bin/apigee-service component_name restart
如要進一步瞭解元件設定檔的名稱和位置,請參閱「屬性檔案的位置」。