[tests] skip mod-secdownload HMAC-SHA1,HMAC-SHA256
[lighttpd.git] / src / log.h
blobea4ed5309296c283c25deab6e91be30d265a84c4
1 #ifndef _LOG_H_
2 #define _LOG_H_
3 #include "first.h"
5 #include "base_decls.h"
6 #include "buffer.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);
13 __attribute_cold__
14 int log_error_write(server *srv, const char *filename, unsigned int line, const char *fmt, ...);
16 __attribute_cold__
17 int log_error_write_multiline_buffer(server *srv, const char *filename, unsigned int line, buffer *multiline, const char *fmt, ...);
19 struct log_error_st {
20 enum { ERRORLOG_FILE, ERRORLOG_FD, ERRORLOG_SYSLOG, ERRORLOG_PIPE } errorlog_mode;
21 int errorlog_fd;
22 buffer *b;
23 buffer *tb;
24 time_t *cur_ts;
25 time_t *last_ts;
28 __attribute_cold__
29 log_error_st * log_error_st_init (time_t *cur_ts_ptr, time_t *last_ts_ptr);
31 __attribute_cold__
32 void log_error_st_free (log_error_st *errh);
34 __attribute_cold__
35 __attribute_format__((__printf__, 4, 5))
36 void log_error(const log_error_st *errh, const char *filename, unsigned int line, const char *fmt, ...);
38 __attribute_cold__
39 __attribute_format__((__printf__, 4, 5))
40 void log_perror(const log_error_st *errh, const char *filename, unsigned int line, const char *fmt, ...);
42 #endif