radsecproxy-1.6.5.
[libradsec.git] / debug.h
1 /*
2  * Copyright (C) 2007 Stig Venaas <venaas@uninett.no>
3  * Copyright (C) 2010,2011 NORDUnet A/S
4  *
5  * Permission to use, copy, modify, and distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  */
9
10 #ifndef SYS_SOLARIS9
11 #include <stdint.h>
12 #endif
13
14 #define DBG_DBG 8
15 #define DBG_INFO 16
16 #define DBG_NOTICE 32
17 #define DBG_WARN 64
18 #define DBG_ERR 128
19
20 #define LOG_TYPE_DEBUG 0
21 #define LOG_TYPE_FTICKS 1
22
23 void debug_init(char *ident);
24 void debug_set_level(uint8_t level);
25 void debug_timestamp_on();
26 uint8_t debug_get_level();
27 void debug(uint8_t level, char *format, ...);
28 void debugx(int status, uint8_t level, char *format, ...);
29 void debugerrno(int err, uint8_t level, char *format, ...);
30 void debugerrnox(int err, uint8_t level, char *format, ...);
31 int debug_set_destination(char *dest, int log_type);
32 void debug_reopen_log();
33 #if defined(WANT_FTICKS)
34 void fticks_debug(const char *format, ...);
35 #endif
36
37 /* Local Variables: */
38 /* c-file-style: "stroustrup" */
39 /* End: */