ekg2
|
00001 /* $Id: debug.h 4564 2008-08-31 15:49:56Z peres $ */ 00002 00003 #ifndef __EKG_DEBUG_H 00004 #define __EKG_DEBUG_H 00005 00006 typedef enum { 00007 DEBUG_IO = 1, 00008 DEBUG_IORECV, 00009 DEBUG_FUNCTION, 00010 DEBUG_ERROR, 00011 DEBUG_GGMISC, /* cause of a lot GG_DEBUG_MISC in libgadu we've got special formats for them... */ 00012 DEBUG_WHITE, 00013 DEBUG_WARN, 00014 DEBUG_OK, 00015 __DEBUG_WTF /* serious fail */ 00016 } debug_level_t; 00017 00018 void debug(const char *format, ...); 00019 void debug_ext(debug_level_t level, const char *format, ...); 00020 00021 #define debug_io(args...) debug_ext(DEBUG_IO, args) 00022 #define debug_iorecv(args...) debug_ext(DEBUG_IORECV, args) 00023 #define debug_function(args...) debug_ext(DEBUG_FUNCTION, args) 00024 #define debug_error(args...) debug_ext(DEBUG_ERROR, args) 00025 #define debug_white(args...) debug_ext(DEBUG_WHITE, args) 00026 #define debug_warn(args...) debug_ext(DEBUG_WARN, args) 00027 #define debug_ok(args...) debug_ext(DEBUG_OK, args) 00028 #define debug_wtf(args...) debug_ext(DEBUG_WTF, args) 00029 00030 #endif 00031 00032 00033 /* 00034 * Local Variables: 00035 * mode: c 00036 * c-file-style: "k&r" 00037 * c-basic-offset: 8 00038 * indent-tabs-mode: t 00039 * End: 00040 */