diff options
author | Garrett Regier <garrettregier@gmail.com> | 2011-12-09 15:07:57 -0800 |
---|---|---|
committer | Garrett Regier <garrettregier@gmail.com> | 2012-02-10 09:36:57 -0800 |
commit | a41cd38979057997686d2989d0aaab6b68c8bca8 (patch) | |
tree | 63a846f532eb986d038f2e742986f96b44838fde /libpeas/peas-debug.c | |
parent | 016bede1edee289f83a4b840939c3db0cf52b321 (diff) | |
download | libpeas-a41cd38979057997686d2989d0aaab6b68c8bca8.tar.gz |
Fix PEAS_DEBUG to work with glib's new G_MESSAGES_DEBUG
Diffstat (limited to 'libpeas/peas-debug.c')
-rw-r--r-- | libpeas/peas-debug.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libpeas/peas-debug.c b/libpeas/peas-debug.c index ec7616e..bec217a 100644 --- a/libpeas/peas-debug.c +++ b/libpeas/peas-debug.c @@ -44,4 +44,25 @@ peas_debug_init (void) debug_log_handler, NULL); } + else + { + const gchar *g_messages_debug; + + g_messages_debug = g_getenv ("G_MESSAGES_DEBUG"); + + if (g_messages_debug == NULL) + { + g_setenv ("G_MESSAGES_DEBUG", G_LOG_DOMAIN, TRUE); + } + else + { + gchar *new_g_messages_debug; + + new_g_messages_debug = g_strconcat (g_messages_debug, " ", + G_LOG_DOMAIN, NULL); + g_setenv ("G_MESSAGES_DEBUG", new_g_messages_debug, TRUE); + + g_free (new_g_messages_debug); + } + } } |