1 #ifndef __DEBUG_PRINTF_H__
2 #define __DEBUG_PRINTF_H__
4 /**\defgroup 100debug Debug
10 typedef enum _DebugLevel
{
11 /** No debug output */
13 /** Print only error messages */
15 /** Print Error and Warning messages */
17 /** Print only error message */
22 * @param dl a #DebugLevel
24 * Set the debug level. if set to DEBUG_INFO everything is printed to stdout.
26 void debug_set_level(DebugLevel dl
);
28 /** Internal function, do no use */
29 void debug_printf_real(DebugLevel dp
, const char *file
,const int line
,const char *function
, const char *format
,...);
32 * @param dp The debug level the message is at.
33 * @param format a printf style string
34 * @param ARGS arguments for format
36 #define debug_printf(dp, format, ARGS...) debug_printf_real(dp,__FILE__,__LINE__,__FUNCTION__,format,##ARGS)
41 * Redirect the output from stdout to fp.
42 * Set to NULL, to revert back to stdout.
44 void debug_set_output(FILE *fp
);