failures.h revision 7c424aa51c956c628e3512055841aa2f9eef4833
#ifndef __FAILURES_H
#define __FAILURES_H
/* Default exit status codes that we could use. */
enum fatal_exit_status {
FATAL_DEFAULT = 89
};
#define DEFAULT_FAILURE_STAMP_FORMAT "%b %d %H:%M:%S "
typedef void failure_callback_t(const char *, va_list);
/* Change failure handlers. Make sure they don't modify errno. */
/* Send failures to syslog() */
/* Send failures to specified log file instead of stderr. */
/* Send informational messages to specified log file. i_set_failure_*()
functions modify the info file too, so call this function after them. */
void i_set_info_file(const char *path);
/* Prefix failures with a timestamp. fmt is in strftime() format. */
void i_set_failure_timestamp_format(const char *fmt);
void failures_deinit(void);
#endif