From e44ab5d5840557491a170af64cf851a9c0f201f2 Mon Sep 17 00:00:00 2001 From: random human Date: Sat, 1 Sep 2018 15:12:53 +0530 Subject: Add function wlr_log_get_verbosity() Returns the verbosity passed to wlr_log_init(). --- include/wlr/util/log.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/wlr/util') diff --git a/include/wlr/util/log.h b/include/wlr/util/log.h index 7b0070bb..0d659780 100644 --- a/include/wlr/util/log.h +++ b/include/wlr/util/log.h @@ -37,6 +37,9 @@ typedef void (*wlr_log_func_t)(enum wlr_log_importance importance, // If `callback` is NULL, wlr will use its default logger. void wlr_log_init(enum wlr_log_importance verbosity, wlr_log_func_t callback); +// Returns the log verbosity provided to wlr_log_init +enum wlr_log_importance wlr_log_get_verbosity(void); + #ifdef __GNUC__ #define _WLR_ATTRIB_PRINTF(start, end) __attribute__((format(printf, start, end))) #else -- cgit v1.2.3 From 6daa69fbf567f8036031867d6767158a0a6e5fe4 Mon Sep 17 00:00:00 2001 From: random human Date: Mon, 3 Sep 2018 16:21:49 +0530 Subject: Update wlr_log_init docs --- include/wlr/util/log.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/wlr/util') diff --git a/include/wlr/util/log.h b/include/wlr/util/log.h index 0d659780..2c441180 100644 --- a/include/wlr/util/log.h +++ b/include/wlr/util/log.h @@ -35,6 +35,8 @@ typedef void (*wlr_log_func_t)(enum wlr_log_importance importance, // Will log all messages less than or equal to `verbosity` // If `callback` is NULL, wlr will use its default logger. +// The function can be called multiple times to update the verbosity or +// callback function. void wlr_log_init(enum wlr_log_importance verbosity, wlr_log_func_t callback); // Returns the log verbosity provided to wlr_log_init -- cgit v1.2.3