#include "rox-clib.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "rox_debug.h"
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.
|
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.
|
|
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.
|