For logging when things happen which should not happen. We may want to do
something more fancy in the future but for now this suffices.

Modelled after log_bug in libevdev.

Signed-off-by: Hans de Goede <hdego...@redhat.com>
Acked-by: Peter Hutterer <peter.hutte...@who-t.net>
---
 src/libinput-private.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/libinput-private.h b/src/libinput-private.h
index 21627b0..f778f6e 100644
--- a/src/libinput-private.h
+++ b/src/libinput-private.h
@@ -80,6 +80,7 @@ struct libinput_source;
 #define log_debug(...) log_msg(LIBINPUT_LOG_PRIORITY_DEBUG, __VA_ARGS__)
 #define log_info(...) log_msg(LIBINPUT_LOG_PRIORITY_INFO, __VA_ARGS__)
 #define log_error(...) log_msg(LIBINPUT_LOG_PRIORITY_ERROR, __VA_ARGS__)
+#define log_bug(...) log_msg(LIBINPUT_LOG_PRIORITY_ERROR, "BUG: "__VA_ARGS__)
 
 void
 log_msg(enum libinput_log_priority priority, const char *format, ...);
-- 
1.9.0

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to