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

用於在 stdio 上報告 SNMP 錯誤的函數

模組 snmpa_error_io 實作了 snmp_error_report 行為 (參見 snmpa_error_report),其中包含兩個回呼函數,這些函數會被呼叫以報告 SNMP 錯誤。

此模組提供了一個簡單的機制來報告 SNMP 錯誤。錯誤會使用 io 模組寫入 stdout。它提供了一個簡單的範例。

此模組需要明確設定,請參閱 snmpa_error組態參數

摘要

函數

如果在組態階段發生錯誤,例如在組態檔案中發現語法錯誤,則會呼叫此函數。

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

函數

此函數的連結

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