18 #define LOG_EMERG 0 /* system is unusable */
19 #define LOG_ALERT 1 /* action must be taken immediately */
20 #define LOG_CRIT 2 /* critical conditions */
21 #define LOG_ERR 3 /* error conditions */
22 #define LOG_WARNING 4 /* warning conditions */
23 #define LOG_NOTICE 5 /* normal but significant condition */
24 #define LOG_INFO 6 /* informational */
25 #define LOG_DEBUG 7 /* debug-level messages */
28 struct snmp_log_message {
33 #ifndef DEFAULT_LOG_ID
34 #define DEFAULT_LOG_ID "net-snmp"
37 void init_snmp_logging(void);
38 int snmp_get_do_logging(void);
39 void snmp_disable_syslog(void);
40 void snmp_disable_filelog(void);
41 void snmp_disable_stderrlog(void);
42 void snmp_disable_calllog(void);
43 void snmp_disable_log(void);
44 void snmp_enable_syslog(void);
45 void snmp_enable_syslog_ident(const char *ident,
47 void snmp_enable_filelog(const char *logfilename,
49 void snmp_enable_stderrlog(void);
50 void snmp_enable_calllog(void);
53 int snmp_log(int priority, const char *format, ...);
55 int snmp_log(va_alist);
57 int snmp_vlog(int priority, const char *format,
60 * 0 - successful message formatting
63 * -1 - Could not format log-string
66 * -2 - Could not allocate memory for log-message
69 * -3 - Log-message too long!
72 void snmp_log_perror(const char *s);
77 #endif /* SNMP_LOGGING_H */