diff options
author | random human <random.bored.human@gmail.com> | 2018-09-01 15:12:53 +0530 |
---|---|---|
committer | random human <random.bored.human@gmail.com> | 2018-09-01 21:03:52 +0530 |
commit | e44ab5d5840557491a170af64cf851a9c0f201f2 (patch) | |
tree | d8ac6e5a85b86b6a2bd25213b2d2634d257fa441 | |
parent | bf670b84c4cf8bd1a2f625308a006a4f8fe0a301 (diff) |
Add function wlr_log_get_verbosity()
Returns the verbosity passed to wlr_log_init().
-rw-r--r-- | include/wlr/util/log.h | 3 | ||||
-rw-r--r-- | util/log.c | 4 |
2 files changed, 7 insertions, 0 deletions
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 @@ -85,3 +85,7 @@ const char *_wlr_strip_path(const char *filepath) { } return filepath; } + +enum wlr_log_importance wlr_log_get_verbosity(void) { + return log_importance; +} |