X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fprocd.git;a=blobdiff_plain;f=procd.h;h=6461be66b3180f396af244d699daffaf8aca2036;hp=4009afc6e6753bb5a29025a2ef10f9b5076d44d7;hb=4a1bfc6ec5033236742967e548bfac9efe851c91;hpb=e0d721487a618490a7db06f76904868a71684071 diff --git a/procd.h b/procd.h index 4009afc..6461be6 100644 --- a/procd.h +++ b/procd.h @@ -12,6 +12,11 @@ fprintf(stderr, "DEBUG %s(%d): " fmt, __func__, __LINE__, ## __VA_ARGS__); \ } while (0) +#define DEBUG(level, fmt, ...) do { \ + if (debug >= level) \ + fprintf(stderr, "DEBUG %s(%d): " fmt, __func__, __LINE__, ## __VA_ARGS__); \ + } while (0) + extern int debug; extern char *ubus_socket; void procd_connect_ubus(void);