From 08251cc0716ed0e41951d38147d983b6cf343271 Mon Sep 17 00:00:00 2001 From: Junghwan Choi Date: Thu, 9 Jun 2016 21:33:57 +0900 Subject: [PATCH] ecore_wl : add wl_log_set_handler_client Change-Id: I7e4d26db0181153d5cffcadaf90ca2a4d6d5d154 Signed-off-by: Junghwan Choi --- src/lib/ecore_wayland/ecore_wl.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_wayland/ecore_wl.c b/src/lib/ecore_wayland/ecore_wl.c index e9c5da8..91c4a2e 100644 --- a/src/lib/ecore_wayland/ecore_wl.c +++ b/src/lib/ecore_wayland/ecore_wl.c @@ -57,7 +57,7 @@ static void _ecore_wl_cb_allowed_aux_hint(void *data EINA_UNUSED, struct tizen_ static void _ecore_wl_window_conformant_area_send(Ecore_Wl_Window *win, uint32_t conformant_part, uint32_t state); static void _ecore_wl_cb_effect_start(void *data EINA_UNUSED, struct tizen_effect *tizen_effect EINA_UNUSED, struct wl_surface *surface_resource, unsigned int type); static void _ecore_wl_cb_effect_end(void *data EINA_UNUSED, struct tizen_effect *tizen_effect EINA_UNUSED, struct wl_surface *surface_resource, unsigned int type); - +static void _ecore_wl_log_cb_print(const char *format, va_list args); /* local variables */ static int _ecore_wl_init_count = 0; static Eina_Bool _ecore_wl_animator_busy = EINA_FALSE; @@ -264,6 +264,8 @@ ecore_wl_init(const char *name) ECORE_WL_EVENT_KEYMAP_UPDATE = ecore_event_type_new(); } + wl_log_set_handler_client(_ecore_wl_log_cb_print); + if (!(_ecore_wl_disp = calloc(1, sizeof(Ecore_Wl_Display)))) { ERR("Could not allocate memory for Ecore_Wl_Display structure"); @@ -1691,3 +1693,11 @@ _ecore_wl_cb_effect_end(void *data EINA_UNUSED, struct tizen_effect *tizen_effec ev->type = type; ecore_event_add(ECORE_WL_EVENT_EFFECT_END, ev, NULL, NULL); } + +static void +_ecore_wl_log_cb_print(const char *format, va_list args) +{ + char buffer[1024]; + vsnprintf(buffer, 1024, format, args); + ERR("_ecore_wl_log_cb_print: %s", buffer); +} -- 2.7.4