tic2mqtt-c/logger.h

18 lines
466 B
C
Raw Normal View History

2021-08-04 12:24:08 +02:00
#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