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

透過 error_logger 回報 SNMP 錯誤的函式

模組 snmpa_error_logger 實作了 snmpa_error_report 行為 (請參閱 snmpa_error_report),其中包含兩個回呼函式,這兩個函式會被呼叫以回報 SNMP 錯誤。

此模組提供了一個簡單的機制來回報 SNMP 錯誤。錯誤會在進行大小檢查後傳送到 error_logger。訊息在超過 1024 個字元後會被截斷。此模組僅作為範例提供。

此模組是預設的錯誤回報模組,但可以明確配置,請參閱 snmpa_error配置參數

另請參閱

error_logger(3)

摘要

函式

如果在配置階段發生錯誤(例如在設定檔中發現語法錯誤),則會呼叫此函式。

如果在執行時期發生與使用者相關的錯誤(例如,使用者定義的儀器函式傳回錯誤),則會呼叫此函式。

函式

連結到此函式

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) 中的相同。