summaryrefslogtreecommitdiffstats
path: root/common/msg.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/msg.h')
-rw-r--r--common/msg.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/common/msg.h b/common/msg.h
index 635a85191f..b0cec7b88a 100644
--- a/common/msg.h
+++ b/common/msg.h
@@ -32,14 +32,15 @@ extern struct mp_log *const mp_null_log;
// Verbosity levels.
enum {
- MSGL_FATAL, // will exit/abort (note: msg.c doesn't exit or abort)
- MSGL_ERR, // continues
- MSGL_WARN, // only warning
- MSGL_INFO, // -quiet
- MSGL_STATUS, // exclusively for the playback status line
- MSGL_V, // -v
- MSGL_DEBUG, // -v -v
- MSGL_TRACE, // -v -v -v
+ MSGL_FATAL, // only errors (difference to MSGL_ERR isn't too clear)
+ MSGL_ERR, // only errors
+ MSGL_WARN, // only warnings
+ MSGL_INFO, // what you normally see on the terminal
+ MSGL_STATUS, // exclusively for the playback status line (-quiet disables)
+ MSGL_V, // -v | slightly more information than default
+ MSGL_DEBUG, // -v -v | full debug information; this and numerically below
+ // should not produce "per frame" output
+ MSGL_TRACE, // -v -v -v | anything that might flood the terminal
MSGL_STATS, // dumping fine grained stats (--dump-stats)
MSGL_MAX = MSGL_STATS,
@@ -59,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__)