--- libelwix/inc/elwix.h 2013/01/17 10:05:35 1.1.1.1 +++ libelwix/inc/elwix.h 2013/01/18 10:10:21 1.1.1.1.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: elwix.h,v 1.1.1.1 2013/01/17 10:05:35 misho Exp $ +* $Id: elwix.h,v 1.1.1.1.2.2 2013/01/18 10:10:21 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -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, fmt, ...) ((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;