檢視原始碼 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)
摘要
函式
如果在配置階段發生錯誤(例如在設定檔中發現語法錯誤),則會呼叫此函式。
Format
和 Args
與 io:format(Format, Args)
中的相同。
如果在執行時期發生與使用者相關的錯誤(例如,使用者定義的儀器函式傳回錯誤),則會呼叫此函式。
Format
和 Args
與 io:format(Format, Args)
中的相同。