Importing all of DRL, including ulogd and all of its files.
[distributedratelimiting.git] / drl / logging.h
1 /* See the DRL-LICENSE file for this file's software license. */
2
3 #ifndef _LOGGING_H_
4 #define _LOGGING_H_
5
6 #include <inttypes.h>
7 #include <stdarg.h>
8 #include <stdio.h>
9
10 #define LOG_CRITICAL    (3)
11 #define LOG_WARN        (2)
12 #define LOG_DEBUG       (1)
13
14 /**
15  * Logging function.  Takes format and arguments similar to printf.
16  */
17 inline void printlog(const uint8_t level, const char *format, ...);
18
19 /**
20  * Flushes the logfile to disk.
21  */
22 void flushlog();
23
24 /**
25  * Returns the log level.
26  */
27 int loglevel();
28
29 #endif  /* _LOGGING_H_ */