Defines | |
#define | dprintf rox_debug_printf |
Functions | |
void | rox_debug_init (const char *progname) |
void | rox_debug_printf (int level, const char *fmt,...) |
Unless the pre-processer symbol DEBUG
is defined as non-zero before rox_debug.h is included then the functions here are defined to be no-operations.
#define dprintf rox_debug_printf |
An alias for rox_debug_printf() to save typing.
void rox_debug_init | ( | const char * | progname | ) |
Initialize the debug system. This is normally called by rox_init() or rox_init_with_domain(). The program name is forced to all upper case and appended with "_DEBUG_LEVEL" to obtain a environment variable name, so that "Clock" becomes "CLOCK_DEBUG_LEVEL". If that variable exists it is interpreted as an integer value and used as the debug level if it is greater than zero. Otherwise the debug level is set to zero.
[in] | progname | program name |
void rox_debug_printf | ( | int | level, | |
const char * | fmt, | |||
... | ||||
) |
Format printf-like arugments and send the result to stderr (using g_logv()) if the level is less than or equal to the current debug level.
[in] | level | the level of the message (0 will always be seen). |
[in] | fmt | a printf()-like format string |
[in] | ... | arguments to the format string |