容器化的无污染DNS服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

24 lines
551 B

#ifndef LOGGER_H_
#define LOGGER_H_
#define LOG_PREFIX "ClearDNS"
enum {
LOG_DEBUG,
LOG_INFO,
LOG_WARN,
LOG_ERROR,
LOG_FATAL
};
#define log_debug(...) log_printf(LOG_DEBUG, __VA_ARGS__)
#define log_info(...) log_printf(LOG_INFO, __VA_ARGS__)
#define log_warn(...) log_printf(LOG_WARN, __VA_ARGS__)
#define log_error(...) log_printf(LOG_ERROR, __VA_ARGS__)
#define log_fatal(...) log_printf(LOG_FATAL, __VA_ARGS__)
extern int LOG_LEVEL;
void log_perror(char *prefix);
void log_printf(int level, const char *fmt, ...);
#endif