If you want it for debugging, why not use something like:
CODE
#define DEBUG
#ifdef DEBUG
#define dbgprintf(format, args...) fprintf (stderr, format , ## args)
#else
#define dbgprintf(format, args...)
#endif
That way, for a release version, you can turn off all debugging output by just commenting out the DEBUG macro:
CODE
//#define DEBUG
Also, your debugging messages come out of a different stream than your usual output, and so can be filtered appropriately. Of course, the above can be changed to output to any file, string, or anything else. Just change the macro. Using it is exactly the same as printf, apart from the 'dbg' prefix.