#ifndef HEX_DEBUG_H #include #define DEBUG_VERBOSITY 1 #define log_err(str, ...) do { fprintf(stderr, "[ERROR] (%s:%d): " str "\n", __FILE__, __LINE__, ##__VA_ARGS__); } while (0) #if (DEBUG_VERBOSITY > 0) #define log_debug(str, ...) do { fprintf(stderr, "[DEBUG] (%s:%d): " str "\n", __FILE__, __LINE__, ##__VA_ARGS__); } while (0) #else #define log_debug(str, ...) #endif #endif