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:
parent
7366553be2
commit
aed2a205ed
1 changed files with 9 additions and 0 deletions
|
@ -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__)
|
||||
|
|
Loading…
Add table
Reference in a new issue