lomoco_debug.h File Reference
#include <libgen.h>
Include dependency graph for lomoco_debug.h:

Go to the source code of this file.
Defines | |
#define | DEFAULT_DEBUG_LEVEL 0 |
#define | LOMOCO_DEBUG(level, fmt, rest...) |
#define | LOMOCO_ERRNO(err, fmt, rest...) lomoco_debug_int(basename(__FILE__),__LINE__,__FUNCTION__,-4,err,fmt,##rest) |
#define | LOMOCO_ERROR(fmt, rest...) lomoco_debug_int(basename(__FILE__),__LINE__,__FUNCTION__,-3,0,fmt,##rest) |
#define | LOMOCO_INFORMAL(fmt, rest...) lomoco_debug_int(basename(__FILE__),__LINE__,__FUNCTION__,-1,0,fmt,##rest) |
#define | LOMOCO_WARNING(fmt, rest...) lomoco_debug_int(basename(__FILE__),__LINE__,__FUNCTION__,-2,0,fmt,##rest) |
Functions | |
void | lomoco_debug_cmd (int, char *[], char *,...) |
int | lomoco_debug_decrease_indent (void) |
int | lomoco_debug_increase_indent (void) |
void | lomoco_debug_int (const char *file, int line, const char *function, int level, int err, const char *fmt,...) |
int | lomoco_get_debug_level (void) |
void | lomoco_set_debug_level (int) |
Define Documentation
#define DEFAULT_DEBUG_LEVEL 0 |
Definition at line 34 of file lomoco_debug.h.
#define LOMOCO_DEBUG | ( | level, | |||
fmt, | |||||
rest... | ) |
Value:
if (level <= lomoco_get_debug_level()) \ lomoco_debug_int(basename(__FILE__),__LINE__,__FUNCTION__,level,0,fmt,##rest)
Definition at line 40 of file lomoco_debug.h.
#define LOMOCO_ERRNO | ( | err, | |||
fmt, | |||||
rest... | ) | lomoco_debug_int(basename(__FILE__),__LINE__,__FUNCTION__,-4,err,fmt,##rest) |
A macro that prints the given error message depending on the error number.
Definition at line 69 of file lomoco_debug.h.
#define LOMOCO_ERROR | ( | fmt, | |||
rest... | ) | lomoco_debug_int(basename(__FILE__),__LINE__,__FUNCTION__,-3,0,fmt,##rest) |
Definition at line 62 of file lomoco_debug.h.
#define LOMOCO_INFORMAL | ( | fmt, | |||
rest... | ) | lomoco_debug_int(basename(__FILE__),__LINE__,__FUNCTION__,-1,0,fmt,##rest) |
Definition at line 48 of file lomoco_debug.h.
#define LOMOCO_WARNING | ( | fmt, | |||
rest... | ) | lomoco_debug_int(basename(__FILE__),__LINE__,__FUNCTION__,-2,0,fmt,##rest) |
Definition at line 55 of file lomoco_debug.h.
Function Documentation
void lomoco_debug_cmd | ( | int | , | |
char * | [], | |||
char * | , | |||
... | ||||
) |
int lomoco_debug_decrease_indent | ( | void | ) |
int lomoco_debug_increase_indent | ( | void | ) |
void lomoco_debug_int | ( | const char * | file, | |
int | line, | |||
const char * | function, | |||
int | level, | |||
int | err, | |||
const char * | fmt, | |||
... | ||||
) |
int lomoco_get_debug_level | ( | void | ) | [inline] |
void lomoco_set_debug_level | ( | int | ) |