tic2mqtt-c/logger.h
2021-08-21 15:15:21 +02:00

18 lines
466 B
C

#ifndef __LOGGER_H__
#define __LOGGER_H__
#define LOG_DEBUG 1
#define LOG_INFO 2
#define LOG_WARNING 3
#define LOG_ERROR 4
#define log_debug(...) logger(LOG_DEBUG, __VA_ARGS__)
#define log_info(...) logger(LOG_INFO, __VA_ARGS__)
#define log_warning(...) logger(LOG_WARNING, __VA_ARGS__)
#define log_error(...) logger(LOG_ERROR, __VA_ARGS__)
extern void set_loglevel(int level);
extern void logger(int priority, const char *fmt, ...);
#endif