1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2025-04-21 18:03:02 -04:00

log: add a new log level, verbose

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2023-12-18 04:11:18 +00:00
parent 7366553be2
commit aed2a205ed
No known key found for this signature in database
GPG key ID: D3A4405BE6CC17F4

View file

@ -9,11 +9,19 @@
enum log_level {
LOG_LEVEL_INVALID = -1,
/// Very noisy debug messages, many lines per frame.
LOG_LEVEL_TRACE = 0,
/// Frequent debug messages, a few lines per frame.
LOG_LEVEL_VERBOSE,
/// Less frequent debug messages.
LOG_LEVEL_DEBUG,
/// Informational messages.
LOG_LEVEL_INFO,
/// Warnings.
LOG_LEVEL_WARN,
/// Errors.
LOG_LEVEL_ERROR,
/// Fatal errors.
LOG_LEVEL_FATAL,
};
@ -31,6 +39,7 @@ enum log_level {
} \
} while (0)
#define log_trace(x, ...) LOG_UNLIKELY(TRACE, x, ##__VA_ARGS__)
#define log_verbose(x, ...) LOG_UNLIKELY(VERBOSE, x, ##__VA_ARGS__)
#define log_debug(x, ...) LOG_UNLIKELY(DEBUG, x, ##__VA_ARGS__)
#define log_info(x, ...) LOG(INFO, x, ##__VA_ARGS__)
#define log_warn(x, ...) LOG(WARN, x, ##__VA_ARGS__)