mirror of https://github.com/dnomd343/ClearDNS
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.
23 lines
514 B
23 lines
514 B
2 years ago
|
#ifndef _LOG_H
|
||
|
#define _LOG_H
|
||
|
|
||
|
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
|