-#define log _log
-#ifndef log_hex
-#define log_hex(a,b,c,d) do{if (a <= config->debug) _log_hex(a,0,0,0,b,c,d);}while (0)
-#endif
+#undef log
+#undef log_hex
+#define log(D, a, s, t, f, ...) ({ if (D <= config->debug) _log(D, a, s, t, f, ## __VA_ARGS__); })
+#define log_hex(D, t, d, s) ({ if (D <= config->debug) _log_hex(D, t, d, s); })
+