27 #define LOG_VERSION "0.1.0"
32 enum { LOG_TRACE, LOG_DEBUG, LOG_INFO, LOG_WARN, LOG_ERROR, LOG_FATAL };
39 #define docker_log_trace(...) docker_log_log(LOG_TRACE, __FILE__, __LINE__, __VA_ARGS__)
46 #define docker_log_debug(...) docker_log_log(LOG_DEBUG, __FILE__, __LINE__, __VA_ARGS__)
53 #define docker_log_info(...) docker_log_log(LOG_INFO, __FILE__, __LINE__, __VA_ARGS__)
60 #define docker_log_warn(...) docker_log_log(LOG_WARN, __FILE__, __LINE__, __VA_ARGS__)
67 #define docker_log_error(...) docker_log_log(LOG_ERROR, __FILE__, __LINE__, __VA_ARGS__)
74 #define docker_log_fatal(...) docker_log_log(LOG_FATAL, __FILE__, __LINE__, __VA_ARGS__)
120 MODULE_API
void docker_log_log(
int level,
const char *file,
int line,
const char *fmt, ...);
Some common declarations.
void docker_log_set_udata(void *udata)
Set the user data for the logger.
Definition: docker_log.c:66
void docker_log_set_level(int level)
Enable the given log level.
Definition: docker_log.c:81
void docker_log_set_lock(log_LockFn fn)
Set the lock function for the logger.
Definition: docker_log.c:71
void docker_log_set_quiet(int enable)
Turn off the given log level.
Definition: docker_log.c:86
void docker_log_log(int level, const char *file, int line, const char *fmt,...)
Internal method for logging, called by all specific log level loggers.
Definition: docker_log.c:91
void(* log_LockFn)(void *udata, int lock)
Definition: docker_log.h:30
void docker_log_set_fp(FILE *fp)
Set the file pointer for the logger.
Definition: docker_log.c:76