#include <stdarg.h>


Go to the source code of this file.
Defines | |
| #define | SPF_error(errmsg) SPF_errorx( __FILE__, __LINE__, "%s", errmsg ) |
| #define | SPF_warning(errmsg) SPF_warningx( __FILE__, __LINE__, "%s", errmsg ) |
| #define | SPF_info(errmsg) SPF_infox( __FILE__, __LINE__, "%s", errmsg ) |
| #define | SPF_debug(errmsg) SPF_debugx( __FILE__, __LINE__, "%s", errmsg ) |
| #define | SPF_errorf SPF_errorx2 |
| #define | SPF_warningf SPF_warningx2 |
| #define | SPF_infof SPF_infox2 |
| #define | SPF_debugf SPF_debugx2 |
| #define | SPF_DEFAULT_ERROR_HANDLER SPF_error_stdio |
| #define | SPF_DEFAULT_WARNING_HANDLER SPF_warning_stdio |
| #define | SPF_DEFAULT_INFO_HANDLER SPF_info_stdio |
| #define | SPF_DEFAULT_DEBUG_HANDLER SPF_debug_stdio |
| #define | SPF_ASSERT_NOTNULL(x) do { if ((x) == NULL) SPF_error(#x " is NULL"); } while(0) |
Functions | |
| void | SPF_errorx (const char *file, int line, const char *format,...) __attribute__((noreturn)) __attribute__((format(printf |
| void void | SPF_errorx2 (const char *format,...) |
| void | SPF_errorv (const char *file, int line, const char *format, va_list ap) __attribute__((noreturn)) __attribute__((format(printf |
| void | SPF_warningx (const char *file, int line, const char *format,...) __attribute__((format(printf |
| void void | SPF_warningx2 (const char *format,...) |
| void | SPF_warningv (const char *file, int line, const char *format, va_list ap) __attribute__((format(printf |
| void | SPF_infox (const char *file, int line, const char *format,...) __attribute__((format(printf |
| void void | SPF_infox2 (const char *format,...) |
| void | SPF_infov (const char *file, int line, const char *format, va_list ap) __attribute__((format(printf |
| void | SPF_debugx (const char *file, int line, const char *format,...) __attribute__((format(printf |
| void void | SPF_debugx2 (const char *format,...) |
| void | SPF_debugv (const char *file, int line, const char *format, va_list ap) __attribute__((format(printf |
| void | SPF_error_stdio (const char *file, int line, const char *errmsg) __attribute__((noreturn)) |
| void | SPF_warning_stdio (const char *file, int line, const char *errmsg) |
| void | SPF_info_stdio (const char *file __attribute__((unused)), int line __attribute__((unused)), const char *errmsg) |
| void | SPF_debug_stdio (const char *file, int line, const char *errmsg) |
| void | SPF_error_syslog (const char *file, int line, const char *errmsg) __attribute__((noreturn)) |
| void | SPF_warning_syslog (const char *file, int line, const char *errmsg) |
| void | SPF_info_syslog (const char *file __attribute__((unused)), int line __attribute__((unused)), const char *errmsg) |
| void | SPF_debug_syslog (const char *file, int line, const char *errmsg) |
Variables | |
| void(* | SPF_error_handler )(const char *, int, const char *) __attribute__((noreturn)) |
| void(* | SPF_warning_handler )(const char *, int, const char *) |
| void(* | SPF_info_handler )(const char *, int, const char *) |
| void(* | SPF_debug_handler )(const char *, int, const char *) |
To use the syslog routines, add code such as:
openlog(logPrefix,LOG_PID|LOG_CONS|LOG_NDELAY|LOG_NOWAIT,LOG_MAIL);
SPF_error_handler = SPF_error_syslog; SPF_warning_handler = SPF_warning_syslog; SPF_info_handler = SPF_info_syslog; SPF_debug_handler = SPF_debug_syslog;
Definition in file spf_log.h.
| #define SPF_ASSERT_NOTNULL | ( | x | ) | do { if ((x) == NULL) SPF_error(#x " is NULL"); } while(0) |
Definition at line 118 of file spf_log.h.
Referenced by SPF_dns_cache_new(), SPF_dns_cache_set_ttl(), SPF_dns_free(), SPF_dns_get_client_dom(), SPF_dns_lookup(), SPF_dns_rr_dup(), SPF_dns_set_conserve_cache(), SPF_i_done(), SPF_realloc(), SPF_record_compile(), SPF_record_expand_data(), SPF_record_find_mod_value(), SPF_record_interpret(), SPF_record_stringify(), SPF_request_free(), SPF_request_get_client_dom(), SPF_request_get_exp(), SPF_request_query_fallback(), SPF_request_query_mailfrom(), SPF_request_query_rcptto(), SPF_request_set_env_from(), SPF_request_set_helo_dom(), SPF_sanitize(), SPF_server_get_record(), SPF_server_set_explanation(), and SPF_server_set_localpolicy().
| #define SPF_debug | ( | errmsg | ) | SPF_debugx( __FILE__, __LINE__, "%s", errmsg ) |
| #define SPF_debugf SPF_debugx2 |
Definition at line 80 of file spf_log.h.
Referenced by SPF_record_compile(), SPF_record_interpret(), SPF_record_stringify(), and SPF_server_get_record().
| #define SPF_error | ( | errmsg | ) | SPF_errorx( __FILE__, __LINE__, "%s", errmsg ) |
Definition at line 40 of file spf_log.h.
Referenced by SPF_dns_cache_new(), SPF_dns_lookup(), SPF_dns_test_new(), SPF_dns_zone_add_str(), SPF_record_expand_data(), and SPF_server_new().
| #define SPF_errorf SPF_errorx2 |
| #define SPF_info | ( | errmsg | ) | SPF_infox( __FILE__, __LINE__, "%s", errmsg ) |
| #define SPF_infof SPF_infox2 |
| #define SPF_warning | ( | errmsg | ) | SPF_warningx( __FILE__, __LINE__, "%s", errmsg ) |
Definition at line 45 of file spf_log.h.
Referenced by SPF_dns_resolv_new(), and SPF_request_get_exp().
| #define SPF_warningf SPF_warningx2 |
| void SPF_debug_stdio | ( | const char * | file, | |
| int | line, | |||
| const char * | errmsg | |||
| ) |
Definition at line 67 of file spf_log_stdio.c.
| void SPF_debug_syslog | ( | const char * | file, | |
| int | line, | |||
| const char * | errmsg | |||
| ) |
| void SPF_debugv | ( | const char * | file, | |
| int | line, | |||
| const char * | format, | |||
| va_list | ap | |||
| ) |
Referenced by SPF_debugx2().
| void SPF_debugx | ( | const char * | file, | |
| int | line, | |||
| const char * | format, | |||
| ... | ||||
| ) |
| void void SPF_debugx2 | ( | const char * | format, | |
| ... | ||||
| ) |
Definition at line 194 of file spf_log.c.
References NULL, and SPF_debugv().

| void SPF_error_stdio | ( | const char * | file, | |
| int | line, | |||
| const char * | errmsg | |||
| ) |
Definition at line 34 of file spf_log_stdio.c.
| void SPF_error_syslog | ( | const char * | file, | |
| int | line, | |||
| const char * | errmsg | |||
| ) |
| void SPF_errorv | ( | const char * | file, | |
| int | line, | |||
| const char * | format, | |||
| va_list | ap | |||
| ) |
Referenced by SPF_errorx2().
| void SPF_errorx | ( | const char * | file, | |
| int | line, | |||
| const char * | format, | |||
| ... | ||||
| ) |
| void void SPF_errorx2 | ( | const char * | format, | |
| ... | ||||
| ) |
Definition at line 167 of file spf_log.c.
References NULL, and SPF_errorv().

| void SPF_info_stdio | ( | const char *file | __attribute__((unused)), | |
| int line | __attribute__((unused)), | |||
| const char * | errmsg | |||
| ) |
Definition at line 61 of file spf_log_stdio.c.
| void SPF_info_syslog | ( | const char *file | __attribute__((unused)), | |
| int line | __attribute__((unused)), | |||
| const char * | errmsg | |||
| ) |
| void SPF_infov | ( | const char * | file, | |
| int | line, | |||
| const char * | format, | |||
| va_list | ap | |||
| ) |
Referenced by SPF_infox2().
| void SPF_infox | ( | const char * | file, | |
| int | line, | |||
| const char * | format, | |||
| ... | ||||
| ) |
| void void SPF_infox2 | ( | const char * | format, | |
| ... | ||||
| ) |
Definition at line 185 of file spf_log.c.
References NULL, and SPF_infov().

| void SPF_warning_stdio | ( | const char * | file, | |
| int | line, | |||
| const char * | errmsg | |||
| ) |
Definition at line 48 of file spf_log_stdio.c.
| void SPF_warning_syslog | ( | const char * | file, | |
| int | line, | |||
| const char * | errmsg | |||
| ) |
| void SPF_warningv | ( | const char * | file, | |
| int | line, | |||
| const char * | format, | |||
| va_list | ap | |||
| ) |
Referenced by SPF_warningx2().
| void SPF_warningx | ( | const char * | file, | |
| int | line, | |||
| const char * | format, | |||
| ... | ||||
| ) |
| void void SPF_warningx2 | ( | const char * | format, | |
| ... | ||||
| ) |
Definition at line 176 of file spf_log.c.
References NULL, and SPF_warningv().

| void(* SPF_debug_handler)(const char *, int, const char *) |
Referenced by SPF_debugv(), and SPF_debugx().
| void(* SPF_error_handler)(const char *, int, const char *) __attribute__((noreturn)) |
Referenced by SPF_errorv(), and SPF_errorx().
| void(* SPF_info_handler)(const char *, int, const char *) |
Referenced by SPF_infov(), and SPF_infox().
| void(* SPF_warning_handler)(const char *, int, const char *) |
Referenced by SPF_warningv(), and SPF_warningx().
1.5.4