2020-07-26 19:05:41 +00:00
|
|
|
#ifndef CORE_LOGGER_H
|
|
|
|
#define CORE_LOGGER_H
|
2020-02-08 12:50:54 +00:00
|
|
|
|
2020-02-09 23:58:17 +00:00
|
|
|
#include <stdio.h>
|
2020-04-13 22:50:55 +00:00
|
|
|
#include <time.h>
|
2020-07-26 19:05:41 +00:00
|
|
|
#include <syslog.h>
|
2020-02-23 00:13:27 +00:00
|
|
|
|
2020-02-08 12:50:54 +00:00
|
|
|
#include <colors.h>
|
|
|
|
#include <config.h>
|
|
|
|
|
2020-04-24 13:08:26 +00:00
|
|
|
void
|
2020-07-26 19:05:41 +00:00
|
|
|
logger_log(int level, const char *filename, int line, const char *func, const char *msg, ...);
|
2020-04-24 13:08:26 +00:00
|
|
|
|
2020-07-26 19:05:41 +00:00
|
|
|
#define LOGGER_DEBUG(...) logger_log(LOG_DEBUG , __FILE__, __LINE__, __func__, ##__VA_ARGS__)
|
|
|
|
#define LOGGER_INFO(...) logger_log(LOG_INFO , __FILE__, __LINE__, __func__, ##__VA_ARGS__)
|
|
|
|
#define LOGGER_NOTICE(...) logger_log(LOG_NOTICE , __FILE__, __LINE__, __func__, ##__VA_ARGS__)
|
|
|
|
#define LOGGER_WARNING(...) logger_log(LOG_WARNING, __FILE__, __LINE__, __func__, ##__VA_ARGS__)
|
|
|
|
#define LOGGER_ERR(...) logger_log(LOG_ERR , __FILE__, __LINE__, __func__, ##__VA_ARGS__)
|
|
|
|
#define LOGGER_CRIT(...) logger_log(LOG_CRIT , __FILE__, __LINE__, __func__, ##__VA_ARGS__)
|
|
|
|
#define LOGGER_EMERG(...) logger_log(LOG_EMERG , __FILE__, __LINE__, __func__, ##__VA_ARGS__)
|
2020-02-08 12:50:54 +00:00
|
|
|
|
2020-07-26 19:05:41 +00:00
|
|
|
#endif //CORE_LOGGER_H
|