[PATCH weston v2 1/5] libinput-seat: redirect libinput log to weston log

U. Artie Eoff ullysses.a.eoff at intel.com
Thu Apr 17 07:53:22 PDT 2014


Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77578

Signed-off-by: U. Artie Eoff <ullysses.a.eoff at intel.com>
---
 src/libinput-seat.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/libinput-seat.c b/src/libinput-seat.c
index b6adc76..99612c4 100644
--- a/src/libinput-seat.c
+++ b/src/libinput-seat.c
@@ -251,6 +251,13 @@ udev_input_enable(struct udev_input *input)
 	return 0;
 }
 
+static void
+libinput_log_func(enum libinput_log_priority priority, void *user_data,
+		     const char *format, va_list args)
+{
+	weston_vlog(format, args);
+}
+
 int
 udev_input_init(struct udev_input *input, struct weston_compositor *c, struct udev *udev,
 		const char *seat_id)
@@ -259,6 +266,8 @@ udev_input_init(struct udev_input *input, struct weston_compositor *c, struct ud
 
 	input->compositor = c;
 
+	libinput_log_set_handler(&libinput_log_func, NULL);
+
 	input->libinput = libinput_udev_create_for_seat(&libinput_interface, input,
 							udev, seat_id);
 	if (!input->libinput) {
-- 
1.8.5.3



More information about the wayland-devel mailing list