ecore-wl2: Add wayland log handler callback to print wl log messages
authorChris Michael <cp.michael@samsung.com>
Tue, 18 Aug 2015 16:52:34 +0000 (12:52 -0400)
committerChris Michael <cp.michael@samsung.com>
Thu, 3 Dec 2015 17:02:40 +0000 (12:02 -0500)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/ecore_wl2/ecore_wl2.c

index 5b643fb..5eb377e 100644 (file)
@@ -14,6 +14,12 @@ int _ecore_wl2_log_dom = -1;
 EAPI int ECORE_WL2_EVENT_GLOBAL_ADDED = 0;
 EAPI int ECORE_WL2_EVENT_GLOBAL_REMOVED = 0;
 
+static void
+_cb_wl_log_print(const char *format, va_list args)
+{
+   EINA_LOG_DOM_INFO(_ecore_wl2_log_dom, format, args);
+}
+
 /* public API functions */
 EAPI int
 ecore_wl2_init(void)
@@ -53,6 +59,8 @@ ecore_wl2_init(void)
         ECORE_WL2_EVENT_GLOBAL_REMOVED = ecore_event_type_new();
      }
 
+   wl_log_set_handler_server(_cb_wl_log_print);
+
    return _ecore_wl2_init_count;
 
 ecore_event_err: