diff --git a/lib/include/logging.h b/lib/include/logging.h new file mode 100644 index 0000000..4f6fb06 --- /dev/null +++ b/lib/include/logging.h @@ -0,0 +1,18 @@ +#ifndef LOGGING_H +#define LOGGING_H + +#include + +#define LOG_ERROR(format, ...) \ + do { \ + fprintf(stderr, "ERROR %s: ", __func__); \ + vfprintf(stderr, format, __VA_ARGS__); \ + } while (0) + +#define LOG_INFO(format, ...) \ + do { \ + fprintf(stderr, "INFO %s: ", __func__); \ + vfprintf(stderr, format, __VA_ARGS__); \ + } while (0) + +#endif