17#define LOG_VERSION "x.x.x modified"
32#define LOG_MAX_CALLBACKS 32
50#define log_trace(...) log_log(LOG_TRACE, __FILE__, __LINE__, __VA_ARGS__)
51#define log_debug(...) log_log(LOG_DEBUG, __FILE__, __LINE__, __VA_ARGS__)
52#define log_info(...) log_log(LOG_INFO, __FILE__, __LINE__, __VA_ARGS__)
53#define log_warn(...) log_log(LOG_WARN, __FILE__, __LINE__, __VA_ARGS__)
54#define log_error(...) log_log(LOG_ERROR, __FILE__, __LINE__, __VA_ARGS__)
55#define log_fatal(...) log_log(LOG_FATAL, __FILE__, __LINE__, __VA_ARGS__)
58#define log_set_lock(fn, udata) _log_set_lock(&L, fn, udata);
59#define log_set_level(level) _log_set_level(&L, level);
60#define log_set_quiet(enable) _log_set_quiet(&L, enable)
61#define log_add_callback(fn, udata, level) _log_add_callback(&L, fn, udata, level)
62#define log_add_fp(fn, level) _log_add_fp(&L, fn, level)
63#define log_log(level, file, line, ...) _log_log(&L, level, file, line, __VA_ARGS__)
void(* log_LogFn)(log_Event *ev)
Definition: log.h:29
void(* log_LockFn)(bool lock, void *udata)
Definition: log.h:30
log_Level
Definition: log.h:48
#define LOG_MAX_CALLBACKS
const char * log_level_string(int level)
const char * level_strings[]
void _log_set_quiet(log_Logger *L, bool enable)
int _log_add_callback(log_Logger *L, log_LogFn fn, void *udata, int level)
int _log_add_fp(log_Logger *L, FILE *fp, int level)
void _log_set_level(log_Logger *L, int level)
const char * level_colors[]
void _log_log(log_Logger *L, int level, const char *file, int line, const char *fmt,...)
void _log_set_lock(log_Logger *L, log_LockFn fn, void *udata)
@ LOG_ERROR
Definition: log.h:48
@ LOG_TRACE
Definition: log.h:48
@ LOG_INFO
Definition: log.h:48
@ LOG_DEBUG
Definition: log.h:48
@ LOG_FATAL
Definition: log.h:48
@ LOG_WARN
Definition: log.h:48
log_LogFn fn
Definition: log.h:35
int level
Definition: log.h:37
void * udata
Definition: log.h:36
const char * fmt
Definition: log.h:21
int level
Definition: log.h:26
void * udata
Definition: log.h:24
struct tm * time
Definition: log.h:23
const char * file
Definition: log.h:22
va_list ap
Definition: log.h:20
int line
Definition: log.h:25
bool quiet
Definition: log.h:44
int level
Definition: log.h:43
void * udata
Definition: log.h:41
log_LockFn lock
Definition: log.h:42