5 #include "base_decls.h"
8 struct timespec
; /* declaration */
9 int log_clock_gettime_realtime (struct timespec
*ts
);
11 ssize_t
write_all(int fd
, const void* buf
, size_t count
);
14 int log_error_write(server
*srv
, const char *filename
, unsigned int line
, const char *fmt
, ...);
17 int log_error_write_multiline_buffer(server
*srv
, const char *filename
, unsigned int line
, buffer
*multiline
, const char *fmt
, ...);
20 enum { ERRORLOG_FILE
, ERRORLOG_FD
, ERRORLOG_SYSLOG
, ERRORLOG_PIPE
} errorlog_mode
;
29 log_error_st
* log_error_st_init (time_t *cur_ts_ptr
, time_t *last_ts_ptr
);
32 void log_error_st_free (log_error_st
*errh
);
35 __attribute_format__((__printf__
, 4, 5))
36 void log_error(const log_error_st
*errh
, const char *filename
, unsigned int line
, const char *fmt
, ...);
39 __attribute_format__((__printf__
, 4, 5))
40 void log_perror(const log_error_st
*errh
, const char *filename
, unsigned int line
, const char *fmt
, ...);