#include
#undef PDEBUG /* undef it, just in case */
#ifdef SCULL_DEBUG
# define PDEBUG(fmt, args...) printf("[%s-%s:%d]-[Debug] " fmt "\n", __FILE__, __func__, __LINE__, ## args)
#else
# define PDEBUG(fmt, args...) /* not debugging: nothing */
#endif
int main(void)
{
char * val = "wifihack.net";
PDEBUG("Hello, %s", val);
return 0;
}
下面是原地址
http://wifihack.net/blog/2009/03/simple-logging-in-c-programming/