diff options
author | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2014-09-12 12:07:43 +0300 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2014-09-12 12:15:44 +0300 |
commit | eb4fd3527809b9133caeb09833798d132467bf07 (patch) | |
tree | 6f3ec4f256ddaa0eec441e46f1ca78c56748df24 | |
parent | c996f1d8bdb6b8d77d18d40b401861a07d340817 (diff) | |
download | weston-eb4fd3527809b9133caeb09833798d132467bf07.tar.gz weston-eb4fd3527809b9133caeb09833798d132467bf07.tar.bz2 weston-eb4fd3527809b9133caeb09833798d132467bf07.zip |
libinput: default to INFO log level
Set the default logging level from libinput to INFO. This matches better
the behaviour of the old input backend, and prints the found input
devices into Weston's log.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Jonas Ã…dahl <jadahl@gmail.com>
-rw-r--r-- | src/libinput-seat.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libinput-seat.c b/src/libinput-seat.c index 09cf7c7e..ef2d804a 100644 --- a/src/libinput-seat.c +++ b/src/libinput-seat.c @@ -260,9 +260,10 @@ libinput_log_func(struct libinput *libinput, } int -udev_input_init(struct udev_input *input, struct weston_compositor *c, struct udev *udev, - const char *seat_id) +udev_input_init(struct udev_input *input, struct weston_compositor *c, + struct udev *udev, const char *seat_id) { + enum libinput_log_priority priority = LIBINPUT_LOG_PRIORITY_INFO; const char *log_priority = NULL; memset(input, 0, sizeof *input); @@ -281,17 +282,16 @@ udev_input_init(struct udev_input *input, struct weston_compositor *c, struct ud if (log_priority) { if (strcmp(log_priority, "debug") == 0) { - libinput_log_set_priority(input->libinput, - LIBINPUT_LOG_PRIORITY_DEBUG); + priority = LIBINPUT_LOG_PRIORITY_DEBUG; } else if (strcmp(log_priority, "info") == 0) { - libinput_log_set_priority(input->libinput, - LIBINPUT_LOG_PRIORITY_INFO); + priority = LIBINPUT_LOG_PRIORITY_INFO; } else if (strcmp(log_priority, "error") == 0) { - libinput_log_set_priority(input->libinput, - LIBINPUT_LOG_PRIORITY_ERROR); + priority = LIBINPUT_LOG_PRIORITY_ERROR; } } + libinput_log_set_priority(input->libinput, priority); + if (libinput_udev_assign_seat(input->libinput, seat_id) != 0) { libinput_unref(input->libinput); return -1; |