summaryrefslogtreecommitdiffstats
path: root/common/msg.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-05-10 16:40:26 +0200
committerwm4 <wm4@nowhere>2020-05-10 16:40:26 +0200
commita600d152d21ef398eb72b008ee3fe266696eb638 (patch)
tree462d79e80d98441847102466ada0906d77494f1c /common/msg.h
parent0b09771ba9f5a54fe1c8c8612a04dd7a1f1672c6 (diff)
downloadmpv-a600d152d21ef398eb72b008ee3fe266696eb638.tar.bz2
mpv-a600d152d21ef398eb72b008ee3fe266696eb638.tar.xz
msg: add function to reduce log level
Sometimes it's helpful to override this for specific mp_log instances, because in some specific circumstances you just want to suppress log file noise you never want to see. -1 is an allowed value (for suppressing MSGL_FATAL==0). It looks like the libplacebo wrapper still does this wrong, so it will probably trigger UB in some cases. I guess I don't care, though.
Diffstat (limited to 'common/msg.h')
-rw-r--r--common/msg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/msg.h b/common/msg.h
index 5c580b8b84..b0cec7b88a 100644
--- a/common/msg.h
+++ b/common/msg.h
@@ -60,6 +60,8 @@ static inline bool mp_msg_test(struct mp_log *log, int lev)
return lev <= mp_msg_level(log);
}
+void mp_msg_set_max_level(struct mp_log *log, int lev);
+
// Convenience macros.
#define mp_fatal(log, ...) mp_msg(log, MSGL_FATAL, __VA_ARGS__)
#define mp_err(log, ...) mp_msg(log, MSGL_ERR, __VA_ARGS__)