diff options
Diffstat (limited to 'netcon/NetconUtilities.cpp')
| -rw-r--r-- | netcon/NetconUtilities.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/netcon/NetconUtilities.cpp b/netcon/NetconUtilities.cpp index 81d4f6f5..c7ebfb5b 100644 --- a/netcon/NetconUtilities.cpp +++ b/netcon/NetconUtilities.cpp @@ -40,15 +40,28 @@ #ifndef _NETCON_UTILITIES_CPP #define _NETCON_UTILITIES_CPP +#define DEBUG_LEVEL 3 + namespace ZeroTier { + void dwr(int level, char *fmt, ... ) + { + if(level > DEBUG_LEVEL) + return; + va_list ap; + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + fflush(stderr); + va_end(ap); + } + void dwr(char *fmt, ... ) { va_list ap; va_start(ap, fmt); vfprintf(stderr, fmt, ap); fflush(stderr); - va_end(ap); + va_end(ap); } void clearscreen() |
