Tweaked debug messages.
This commit is contained in:
parent
4de598054a
commit
bca6097ae4
3 changed files with 13 additions and 9 deletions
|
@ -12,7 +12,8 @@
|
|||
#define DLVL_DONTEVEN 10 // All messages enabled, even pointless ones.
|
||||
#if DEBUG > 0
|
||||
#include <stdio.h>
|
||||
#define DEBUG_MSG(lvl, msg, ...) if (DEBUG >= lvl){fprintf(stderr, "[%s:%d] " msg "\n", __FILE__, __LINE__, ##__VA_ARGS__);}
|
||||
#include <unistd.h>
|
||||
#define DEBUG_MSG(lvl, msg, ...) if (DEBUG >= lvl){fprintf(stderr, "[%d][%s:%d] " msg "\n", getpid(), __FILE__, __LINE__, ##__VA_ARGS__);}
|
||||
#else
|
||||
#define DEBUG_MSG(lvl, msg, ...) // Debugging disabled.
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue