These routines are used to provide logging functions. Messages can be divided into classes and separately enabled and disabled.
Used to log a message in a similar way to printf.
Defaults to a using
fprintf
onstderr
.
And all of the special functions.
The macros such as ‘L’ depend on the GNU CC variable number of arguments to macros extension. If you wish to compile your code on other systems you might wish to use the following variations on ‘L’, etc.
Each of these macros calls the corresponding function from the previous group, i.e. by default ‘VLG’ is the same as a call to ‘LG’. If you define ‘WITHOUT_NANA’ all these macros are translated to ‘/* empty */’.
Thus you can have nana under GCC whilst the code is still portable to other compilers. However debugging information will not be available on other platforms.
Note: the argument list is surrounded by two sets of brackets. For example:
VL(("haze in darwin = %d\n", 3.4));
Used to enable and disable logging independently of guard expressions.
2
- Always print message
1
- Print message only if the guard expression is true.
0
- Never print any messages.
Defaults to
1
.
The default handler for printing which is simply the name of the logging function or macro.
Defaults to
fprintf
The default parameter passed off to the logging function or macro.
Defaults to
stderr