WIP: Fix the Proxy-State issue.
[libradsec.git] / debug.h
1 /* Copyright (c) 2007-2009, UNINETT AS
2  * Copyright (c) 2010-2011, NORDUnet A/S */
3 /* See LICENSE for licensing information. */
4
5 #ifndef SYS_SOLARIS9
6 #include <stdint.h>
7 #endif
8
9 #define DBG_DBG 8
10 #define DBG_INFO 16
11 #define DBG_NOTICE 32
12 #define DBG_WARN 64
13 #define DBG_ERR 128
14
15 #define LOG_TYPE_DEBUG 0
16 #define LOG_TYPE_FTICKS 1
17
18 void debug_init(char *ident);
19 void debug_set_level(uint8_t level);
20 void debug_timestamp_on();
21 uint8_t debug_get_level();
22 void debug(uint8_t level, char *format, ...);
23 void debugx(int status, uint8_t level, char *format, ...);
24 void debugerrno(int err, uint8_t level, char *format, ...);
25 void debugerrnox(int err, uint8_t level, char *format, ...);
26 int debug_set_destination(char *dest, int log_type);
27 void debug_reopen_log();
28 #if defined(WANT_FTICKS)
29 void fticks_debug(const char *format, ...);
30 #endif
31
32 /* Local Variables: */
33 /* c-file-style: "stroustrup" */
34 /* End: */