--- a/src/server/daemon/log.h Tue Jan 01 19:22:56 2013 +0100 +++ b/src/server/daemon/log.h Wed Jan 02 16:03:50 2013 +0100 @@ -32,6 +32,8 @@ #include "../public/nsapi.h" #include "../ucx/string.h" +#include <inttypes.h> + #ifdef __cplusplus extern "C" { #endif @@ -46,7 +48,15 @@ int log_stdout; int log_stderr; } LogConfig; - + +typedef struct { + sstr_t file; + sstr_t format; // unused + FILE *log; + uint32_t ref; +} AccessLog; + +// server logging int init_log_file(LogConfig *cfg); void log_uninitialized_writeln(char *str, size_t len); @@ -57,6 +67,11 @@ int log_ereport(int degree, const char *format, ...); +// access logging +AccessLog* get_access_log(sstr_t file, sstr_t format); +AccessLog* get_default_access_log(); + +// TODO: ref/unref #ifdef __cplusplus }