--- libelwix/inc/elwix.h 2013/01/17 10:05:35 1.1 +++ libelwix/inc/elwix.h 2013/02/04 16:42:31 1.1.1.1.2.5 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: elwix.h,v 1.1 2013/01/17 10:05:35 misho Exp $ +* $Id: elwix.h,v 1.1.1.1.2.5 2013/02/04 16:42:31 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -64,7 +64,7 @@ SUCH DAMAGE. #include #include #include -#include +#include #include @@ -147,7 +147,15 @@ extern int elwix_Verbose; #define e_incVerbose (elwix_Verbose++) #define e_decVerbose (elwix_Verbose--) -#define EVERBOSE(x) if ((x) <= elwix_Verbose) +#define EVERBS(x) if ((x) <= elwix_Verbose) +#define EVERBOSE(x, fmt, ...) do { assert((fmt)); \ + if ((x) <= elwix_Verbose) { \ + char str[BUFSIZ] = { 0 }; \ + snprintf(str, sizeof str, (fmt), ##__VA_ARGS__); \ + syslog(LOG_DEBUG, "Verbose(%d):%s(%d): %s\n", \ + (x), __func__, __LINE__, str); \ + } \ + } while (0) /* Debug macros */ extern int elwix_Debug;