diff options
author | rofl0r <rofl0r@users.noreply.github.com> | 2021-02-05 04:45:19 +0300 |
---|---|---|
committer | rofl0r <rofl0r@users.noreply.github.com> | 2021-02-05 04:45:19 +0300 |
commit | 181cc0f4142467ebe81d2e3636f760687ce4caca (patch) | |
tree | 3b856adce24e33c1b0297858334e462aa2653f1d | |
parent | 3721f7e14449c4ef5d4aba8cb8a58fdb8d74c1df (diff) |
debug.h: print pid in all debug output
-rw-r--r-- | src/debug.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/debug.h b/src/debug.h index 40a93d2..45082c2 100644 --- a/src/debug.h +++ b/src/debug.h @@ -5,7 +5,7 @@ #ifdef DEBUG # define PSTDERR(fmt, args...) do { dprintf(2,fmt, ## args); } while(0) -# define PDEBUG(fmt, args...) PSTDERR("DEBUG:"fmt, ## args) +# define PDEBUG(fmt, args...) PSTDERR("DEBUG:pid[%d]:" fmt, getpid(), ## args) # define DEBUGDECL(args...) args # define DUMP_PROXY_CHAIN(A, B) dump_proxy_chain(A, B) #else @@ -14,7 +14,7 @@ # define DUMP_PROXY_CHAIN(args...) do {} while (0) #endif -# define PFUNC() do { PDEBUG("pid[%d]:%s\n", getpid(), __FUNCTION__); } while(0) +# define PFUNC() do { PDEBUG("%s()\n", __FUNCTION__); } while(0) #include "core.h" void dump_proxy_chain(proxy_data *pchain, unsigned int count); |