12 lines
393 B
C
12 lines
393 B
C
#ifndef HEX_DEBUG_H
|
|
#include <stdio.h>
|
|
#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
|