Add a log_bug macro

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 <hdegoede@redhat.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Hans de Goede 2014-04-15 14:28:09 +02:00 committed by Jonas Ådahl
parent 9c61146e9e
commit 91952e05fe

View file

@ -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, ...);