]> jfr.im git - irc/quakenet/newserv.git/blob - nterfacer/logging.h
BUILD: add require-all build mode
[irc/quakenet/newserv.git] / nterfacer / logging.h
1 /*
2 nterface logging functions
3 Copyright (C) 2003-2004 Chris Porter.
4 */
5
6 #ifndef __nterface_logging_H
7 #define __nterface_logging_H
8
9 #define ROTATE_LOG_EVERY 86400
10 #define ROTATE_LOG_TIMES 14
11
12 #define NL_INFO 0x001
13 #define NL_DEBUG 0x002
14 #define NL_WARNING 0x004
15 #define NL_ERROR 0x008
16 #define NL_SYSTEM 0x010
17 #define NL_LOG_ONLY 0x100
18 #define NL_DONT_LOG 0x200
19
20 struct nterface_auto_log {
21 FILE *log;
22 sstring *filename;
23 sstring *name;
24 int debug;
25 void *schedule;
26 } nterface_auto_log;
27
28 void nterface_log(struct nterface_auto_log *ourlog, int loglevel, char *format, ...) __attribute__ ((format (printf, 3, 4)));
29 struct nterface_auto_log *nterface_open_log(char *name, char *filename, int debug);
30 struct nterface_auto_log *nterface_close_log(struct nterface_auto_log *ourlog);
31
32 #endif