[telepathy-mission-control/master] mcd_debug_init: log the telepathy-mission-control version

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Sep 2 04:27:11 PDT 2009


It's easier to interpret MC logs if they mention the version number
up-front.
---
 src/mcd-debug.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/mcd-debug.c b/src/mcd-debug.c
index 10833e4..3c4e9f9 100644
--- a/src/mcd-debug.c
+++ b/src/mcd-debug.c
@@ -35,6 +35,8 @@
  * FIXME
  */
 
+#include <config.h>
+
 #include <stdlib.h>
 #include "mcd-debug.h"
 #include "mcd-operation.h"
@@ -117,8 +119,12 @@ void mcd_debug_init ()
     gchar *mc_debug_str;
 
     mc_debug_str = getenv ("MC_DEBUG");
+
     if (mc_debug_str)
 	mcd_debug_level = atoi (mc_debug_str);
+
+    if (mcd_debug_level >= 1)
+        g_debug ("%s version %s", PACKAGE, VERSION);
 }
 
 void
-- 
1.5.6.5




More information about the telepathy-commits mailing list