#include <stdio.h> /* fprintf */

#ifdef DEBUG
#	define DEBUGLVL D_NOTICE
#else
#	define DEBUGLVL D_WARNING /* default debuglevel */
#endif

#define D_NOTICE 1 /* verbose */
#define D_WARNING 2
#define D_ERROR 3
#define D_FATAL 4 /* only critical messages */
#define D_NOW 100 /* temporary */

#define DEBUGP(lvl, fmt, args...) if (lvl>=DEBUGLVL) fprintf(stderr, fmt, ##args)

