From 2f14b5cc3f065a7c03c1238f5d09d69e60827b55 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 19 Nov 2013 20:04:49 -0500 Subject: [PATCH] wayland: Set a log handler To see error messages and such --- src/wayland/meta-wayland.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c index dabdc1ed3..061aa0e60 100644 --- a/src/wayland/meta-wayland.c +++ b/src/wayland/meta-wayland.c @@ -616,6 +616,15 @@ set_gnome_env (const char *name, } } +static void +meta_wayland_log_func (const char *fmt, + va_list arg) +{ + char *str = g_strdup_vprintf (fmt, arg); + g_warning ("WL: %s", str); + g_free (str); +} + void meta_wayland_init (void) { @@ -633,6 +642,7 @@ meta_wayland_init (void) g_error ("failed to create wayland display"); wl_display_init_shm (compositor->wayland_display); + wl_log_set_handler_server(meta_wayland_log_func); wl_list_init (&compositor->frame_callbacks);