--- common/Makefile.am | 1 + common/log.c | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/common/Makefile.am b/common/Makefile.am index 7382509..042fa97 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -91,6 +91,7 @@ endif AM_CPPFLAGS = \ -I$(top_srcdir) \ + -DG_LOG_DOMAIN=\"Spice\" \ $(SPICE_COMMON_CFLAGS) \ $(PROTOCOL_CFLAGS) \ $(NULL) diff --git a/common/log.c b/common/log.c index 6dd0436..697c983 100644 --- a/common/log.c +++ b/common/log.c @@ -79,10 +79,10 @@ static void spice_log_set_debug_level(void) */ debug_env = (char *)g_getenv("G_MESSAGES_DEBUG"); if (debug_env == NULL) { - g_setenv("G_MESSAGES_DEBUG", SPICE_LOG_DOMAIN, FALSE); + g_setenv("G_MESSAGES_DEBUG", G_LOG_DOMAIN, FALSE); } else { - debug_env = g_strconcat(debug_env, ":", SPICE_LOG_DOMAIN, NULL); - g_setenv("G_MESSAGES_DEBUG", SPICE_LOG_DOMAIN, FALSE); + debug_env = g_strconcat(debug_env, ":", G_LOG_DOMAIN, NULL); + g_setenv("G_MESSAGES_DEBUG", G_LOG_DOMAIN, FALSE); g_free(debug_env); } } @@ -104,7 +104,7 @@ static void spice_log_set_abort_level(void) fatal_mask |= glib_abort_level; glib_abort_level >>= 1; } - g_log_set_fatal_mask(SPICE_LOG_DOMAIN, fatal_mask); + g_log_set_fatal_mask(G_LOG_DOMAIN, fatal_mask); } } else { abort_level = SPICE_ABORT_LEVEL_DEFAULT; @@ -132,7 +132,7 @@ static void spice_log_init_once(void) spice_log_set_debug_level(); spice_log_set_abort_level(); g_once_init_leave (&logging_initialized, TRUE); - g_log_set_handler(SPICE_LOG_DOMAIN, + g_log_set_handler(G_LOG_DOMAIN, G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, spice_logger, NULL); } -- 2.5.0 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel