lighttpd 1.4.x
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
672 B

#ifndef _LOG_H_
#define _LOG_H_
#include "server.h"
ssize_t write_all(int fd, const void* buf, size_t count);
/* Close fd and _try_ to get a /dev/null for it instead.
* Returns 0 on success and -1 on failure (fd gets closed in all cases)
int openDevNull(int fd);
int open_logfile_or_pipe(server *srv, const char* logfile);
int log_error_open(server *srv);
int log_error_close(server *srv);
int log_error_write(server *srv, const char *filename, unsigned int line, const char *fmt, ...);
int log_error_write_multiline_buffer(server *srv, const char *filename, unsigned int line, buffer *multiline, const char *fmt, ...);
int log_error_cycle(server *srv);