This stuff is implemented in the lib/log.c module
and by default prototyped in lib/lib.h.
There are two levels of debugging. Global debugging is turned on
if there is the macro
DEBUG defined. The local debugging
should be turned on and off for every module separately by defining the macro
These functions should be used for debugging and informative printing
purposes, the format is the same as in the
msg: Print message to stdout.
err: Print message to stderr.
die: Print message to stderr and abort the process.
DBG: Macro doing the same job as
msg, but only if
DBGLN: Dtto, but with source line number prepended.
BUG: Abort process.
The wide usage of
ASSERT macro is recommended.