NetWorker:如何啟用 REST API 除錯
Summary: 本文說明如何針對在 NetWorker 中執行的具象狀態傳輸 (REST) 應用程式程式設計介面 (API) 呼叫啟用偵錯。
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Instructions
- 登入 NetWorker 伺服器。
- 製作logback.xml檔案的複本:
Linux:
/nsr/authc/webapps/nwrestapi/WEB-INF/classes/logback.xml
Windows:
C:\Program Files\EMC NetWorker\nsr\authc-server\tomcat\webapps\nwrestapi\WEB-INF\classes\logback.xml
- 使用文字編輯器開啟logback.xml檔案,並進行以下變更:
<!-- Note: Supported levels are "error", "warn", "info", "debug", and "trace". --> <logger name="com.emc.nw.webapi" level="info"/> <logger name="com.emc.nw.comm" level="info"/> <logger name="com.emc.nw.util" level="info"/> <!-- Note: For API call logging, enable the following trace settings. <logger name="com.emc.nw.webapi.WebApiRequest" level="trace"/> <logger name="com.emc.nw.webapi.WebApiResponse" level="trace"/> --> <logger name="org.springframework" level="warn"/> <logger name="org.apache.cxf.jaxrs.provider" level="error"/> <root level="warn">
至:
<!-- Note: Supported levels are "error", "warn", "info", "debug", and "trace". --> <logger name="com.emc.nw.webapi" level="debug"/> <logger name="com.emc.nw.comm" level="debug"/> <logger name="com.emc.nw.util" level="debug"/> <!-- Note: For API call logging, enable the following trace settings. --> <logger name="com.emc.nw.webapi.WebApiRequest" level="trace"/> <logger name="com.emc.nw.webapi.WebApiResponse" level="trace"/> <logger name="org.springframework" level="debug"/> <logger name="org.apache.cxf.jaxrs.provider" level="debug"/> <root level="debug">
注意: 請將反白顯示的層級值從「警告」變更為「除錯」。將 --> 從 WebApi 行的末尾移動到註釋行的末尾。“<-- -->”中的數據以 XML 格式註釋,服務設置不會讀取。
- 不需要重新啟動服務。重現需要 REST API 除錯的問題。若要停用除錯,請還原變更或移除修改過的logback.xml,然後將副本放回原位。
- 收集restapi.log:
Linux:
/nsr/logs/restapi/restapi.log
Windows:
C:\Program Files\EMC NetWorker\nsr\logs\restapi\restapi.log
- NetWorker 認證 記錄也有助於故障診斷 REST API 相關問題:
Linux:
/nsr/authc/logs
Windows:
C:\Program Files\EMC NetWorker\nsr\authc-server\tomcat\logs
Additional Information
Affected Products
NetWorkerProducts
NetWorker Family, NetWorker SeriesArticle Properties
Article Number: 000206441
Article Type: How To
Last Modified: 01 Jan 2026
Version: 6
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.