48 const
char* format, ...);
71 #define LOG_DEBUG(tag, ...) log_message(LOG_LEVEL_DEBUG, tag, __VA_ARGS__)
73 #define LOG_INFO(tag, ...) log_message(LOG_LEVEL_INFO, tag, __VA_ARGS__)
75 #define LOG_WARNING(tag, ...) log_message(LOG_LEVEL_WARNING, tag, __VA_ARGS__)
77 #define LOG_WARN(tag, ...) LOG_WARNING(tag, __VA_ARGS__)
79 #define LOG_ERROR(tag, ...) log_message(LOG_LEVEL_ERROR, tag, __VA_ARGS__)
81 #define LOG_CRITICAL(tag, ...) log_message(LOG_LEVEL_CRITICAL, tag, __VA_ARGS__)
void log_set_callback(LogCallback callback)
Sets a custom callback for log messages.
Definition: log.c:91
void log_set_level(LogLevel level)
Sets the global minimum log level.
Definition: log.c:85
void log_message(LogLevel level, const char *tag, const char *format,...)
Logs a formatted message.
Definition: log.c:104
void(* LogCallback)(LogLevel level, const char *tag, const char *message)
Callback type for log message interception.
Definition: log.h:33
LogLevel
Severity levels for log filtering.
Definition: log.h:13
@ LOG_LEVEL_CRITICAL
Definition: log.h:23
@ LOG_LEVEL_DEBUG
Definition: log.h:15
@ LOG_LEVEL_ERROR
Definition: log.h:21
@ LOG_LEVEL_WARNING
Definition: log.h:20
@ LOG_LEVEL_NOTSET
Definition: log.h:14
@ LOG_LEVEL_INFO
Definition: log.h:17
LogLevel log_get_level(void)
Retrieves the current global log level.
Definition: log.c:96