summaryrefslogtreecommitdiffstats
path: root/common/msg.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/msg.h')
-rw-r--r--common/msg.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/common/msg.h b/common/msg.h
index 21228870f4..635a85191f 100644
--- a/common/msg.h
+++ b/common/msg.h
@@ -52,7 +52,12 @@ void mp_msg(struct mp_log *log, int lev, const char *format, ...)
PRINTF_ATTRIBUTE(3, 4);
void mp_msg_va(struct mp_log *log, int lev, const char *format, va_list va);
-bool mp_msg_test(struct mp_log *log, int lev);
+int mp_msg_level(struct mp_log *log);
+
+static inline bool mp_msg_test(struct mp_log *log, int lev)
+{
+ return lev <= mp_msg_level(log);
+}
// Convenience macros.
#define mp_fatal(log, ...) mp_msg(log, MSGL_FATAL, __VA_ARGS__)