libspf2 1.2.11
|
#include <stdarg.h>
Go to the source code of this file.
Macros | |
#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 *) |
Error messages and warnings generated internally by the library call these routines. By default, the messages go to stderr, but you can define your own routines to deal with the messages instead.
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_debug | ( | errmsg | ) | SPF_debugx( __FILE__, __LINE__, "%s", errmsg ) |
#define SPF_debugf SPF_debugx2 |
#define SPF_DEFAULT_DEBUG_HANDLER SPF_debug_stdio |
#define SPF_DEFAULT_ERROR_HANDLER SPF_error_stdio |
#define SPF_DEFAULT_INFO_HANDLER SPF_info_stdio |
#define SPF_DEFAULT_WARNING_HANDLER SPF_warning_stdio |
#define SPF_error | ( | errmsg | ) | SPF_errorx( __FILE__, __LINE__, "%s", errmsg ) |
#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 ) |
#define SPF_warningf SPF_warningx2 |
Definition at line 67 of file spf_log_stdio.c.
void void SPF_debugx2 | ( | const char * | format, |
... | |||
) |
Definition at line 194 of file spf_log.c.
References NULL, and SPF_debugv().
Definition at line 34 of file spf_log_stdio.c.
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 void SPF_infox2 | ( | const char * | format, |
... | |||
) |
Definition at line 185 of file spf_log.c.
References NULL, and SPF_infov().
Definition at line 48 of file spf_log_stdio.c.
void void SPF_warningx2 | ( | const char * | format, |
... | |||
) |
Definition at line 176 of file spf_log.c.
References NULL, and SPF_warningv().
|
extern |
Referenced by SPF_debugv(), and SPF_debugx().
|
extern |
Referenced by SPF_errorv(), and SPF_errorx().
|
extern |
Referenced by SPF_infov(), and SPF_infox().
|
extern |
Referenced by SPF_warningv(), and SPF_warningx().