檢視原始碼 snmpa_error (snmp v5.18)

用於報告 SNMP 錯誤的函式

模組 snmpa_error 包含兩個回呼函式,當代理程式操作期間在不同時間發生錯誤時會呼叫它們。這些函式接著會呼叫已設定的錯誤報告模組中的對應函式,該模組實作實際的報告功能。

工具組提供了兩個簡單的實作;模組 snmpa_error_logger 為預設值,以及 snmpa_error_io

錯誤報告模組使用 error_report_mod 指令進行設定,請參閱設定參數

摘要

函式

如果在設定階段發生錯誤時,會呼叫此函式,例如在組態檔中發現語法錯誤。

如果在執行期間發生使用者相關錯誤時,會呼叫此函式,例如如果使用者定義的檢測函式傳回錯誤。

函式

連結到此函式

config_err(Format, Args)

檢視原始碼
-spec config_err(Format, Args) -> snmp:void() when Format :: string(), Args :: list().

如果在設定階段發生錯誤時,會呼叫此函式,例如在組態檔中發現語法錯誤。

FormatArgsio:format(Format, Args) 中的相同。

連結到此函式

user_err(Format, Args)

檢視原始碼
-spec user_err(Format, Args) -> snmp:void() when Format :: string(), Args :: list().

如果在執行期間發生使用者相關錯誤時,會呼叫此函式,例如如果使用者定義的檢測函式傳回錯誤。

FormatArgsio:format(Format, Args) 中的相同。