man rdebug (Fonctions bibliothèques) - Roy debug message facility

NAME

rdebug - Roy debug message facility

SYNOPSIS

#include <roy.h>

void rdebug_enable (char *domains);

RDEBUG ((char *domain, char *format, ...));

DESCRIPTION

rdebug(3) implements a simple messaging facility that can be left in the code, and turned on at will. the RDEBUG macro is used to insert debugging messages into the code with different domains. These messages can then be turned on via a call to rdebug_enable(). The rdebug messages inserted via the macro can be compiled out in production code by defining RDEBUG_DISABLE during compile.

A call to rdebug_enable() enables Roy debugging facilities, and any messages matching those in the domains argument will be printed to the screen. domains is a comma seprated list of domains to debug.

RDEBUG inserts a debug message to be printed. The domain argument is the domain to which this message belongs - we usually just use the filename the call appears in. The format argument is a rbuf_sprintf(3) style format string (identical to printf(3) with the addition of RBufs).

Note that double parentheses are used in RDEBUG to enable the call to be compiled out.

RETURN VALUES

This function and macro have no return values.

ERRORS

These functions can produce no errors.

SEE ALSO