From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S9Ssq-0005K6-GD for garchives@archives.gentoo.org; Mon, 19 Mar 2012 03:03:44 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1E584E0B5B; Mon, 19 Mar 2012 03:03:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E5E80E0C03 for ; Mon, 19 Mar 2012 03:03:29 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3B6BD1B402D for ; Mon, 19 Mar 2012 03:03:29 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id EBE38E5401 for ; Mon, 19 Mar 2012 03:03:27 +0000 (UTC) From: "Alexandre Restovtsev" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexandre Restovtsev" Message-ID: <1332126111.0d5b2a081c7d48464d059494ed889e52c0d185d9.tetromino@gentoo> Subject: [gentoo-commits] proj/openrc-settingsd:master commit in: src/ X-VCS-Repository: proj/openrc-settingsd X-VCS-Files: src/main.c X-VCS-Directories: src/ X-VCS-Committer: tetromino X-VCS-Committer-Name: Alexandre Restovtsev X-VCS-Revision: 0d5b2a081c7d48464d059494ed889e52c0d185d9 X-VCS-Branch: master Date: Mon, 19 Mar 2012 03:03:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 30d2b5d9-87af-4565-a91d-948a40aeddfb X-Archives-Hash: 3efa4e93ca78d4caed57e2d12441fcb9 commit: 0d5b2a081c7d48464d059494ed889e52c0d185d9 Author: Alexandre Rostovtsev gentoo org> AuthorDate: Mon Mar 19 03:01:51 2012 +0000 Commit: Alexandre Restovtsev gmail com> CommitDate: Mon Mar 19 03:01:51 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc-settin= gsd.git;a=3Dcommit;h=3D0d5b2a08 Respect --debug switch when using >=3Dglib-2.31.2 --- src/main.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/main.c b/src/main.c index fabb96c..887cccd 100644 --- a/src/main.c +++ b/src/main.c @@ -40,6 +40,7 @@ static GOptionEntry option_entries[] =3D { NULL } }; =20 +/* Emulates the new behavior of g_log_default_handler introduced in glib= -2.31.2 */ static void log_handler (const gchar *log_domain, GLogLevelFlags log_level, @@ -58,7 +59,6 @@ main (gint argc, gchar *argv[]) GMainLoop *loop =3D NULL; =20 g_type_init (); - g_log_set_default_handler (log_handler, NULL); =20 option_context =3D g_option_context_new ("- system settings D-Bus se= rvice for OpenRC"); g_option_context_add_main_entries (option_context, option_entries, N= ULL); @@ -67,6 +67,12 @@ main (gint argc, gchar *argv[]) exit (1); } =20 + if (glib_check_version (2, 31, 2) =3D=3D NULL) { + if (debug) + g_setenv("G_MESSAGES_DEBUG", "all", TRUE); + } else + g_log_set_default_handler (log_handler, NULL); + shell_utils_init (); hostnamed_init (read_only); localed_init (read_only);