[geany/geany] 70e0f6: Fix verbose output with GLib 2.32 and newer

Colomban Wendling git-noreply at xxxxx
Sun Jun 3 14:47:18 UTC 2012


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Sun, 03 Jun 2012 14:47:18
Commit:      70e0f6eaa0c7213e9f4681c5941b37a89a8e961c
             https://github.com/geany/geany/commit/70e0f6eaa0c7213e9f4681c5941b37a89a8e961c

Log Message:
-----------
Fix verbose output with GLib 2.32 and newer

Since GLib 2.32, messages logged with levels INFO and DEBUG aren't
output by the default log handler unless the G_MESSAGES_DEBUG
environment variable contains the domain of the message or is set to
the special value "all".

Since we use INFO level messages for verbose mode, we need to make
sure this environment variable is properly set when in verbose mode.


Modified Paths:
--------------
    src/main.c

Modified: src/main.c
7 files changed, 7 insertions(+), 0 deletions(-)
===================================================================
@@ -528,6 +528,13 @@ static void parse_command_line_options(gint *argc, gchar ***argv)
 	}
 
 	app->debug_mode = verbose_mode;
+	if (app->debug_mode)
+	{
+		/* Since GLib 2.32 messages logged with levels INFO and DEBUG aren't output by the
+		 * default log handler unless the G_MESSAGES_DEBUG environment variable contains the
+		 * domain of the message or is set to the special value "all" */
+		g_setenv("G_MESSAGES_DEBUG", "all", FALSE);
+	}
 
 #ifdef G_OS_WIN32
 	win32_init_debug_code();


@@ Diff output truncated at 100000 characters. @@


--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).



More information about the Commits mailing list