summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosimo Alfarano <cosimo.alfarano@collabora.co.uk>2010-02-25 15:27:51 +0000
committerCosimo Alfarano <cosimo.alfarano@collabora.co.uk>2010-02-25 15:37:52 +0000
commitf460f051e89dc0088bc12b59aca2664f0d5e8a66 (patch)
tree285d85160e1fdc4fd4abce51536a0173a01c94a8
parentbee2939e886835e90108f72c25bd38435d4128b5 (diff)
downloadtelepathy-logger-f460f051e89dc0088bc12b59aca2664f0d5e8a66.tar.gz
Improving debug messaes for log-manager and log-store-emapthy
Plus some typos in comments
-rw-r--r--telepathy-logger/debug.h4
-rw-r--r--telepathy-logger/log-manager.c8
-rw-r--r--telepathy-logger/log-store-empathy.c2
3 files changed, 10 insertions, 4 deletions
diff --git a/telepathy-logger/debug.h b/telepathy-logger/debug.h
index 1766b2c..db9b35a 100644
--- a/telepathy-logger/debug.h
+++ b/telepathy-logger/debug.h
@@ -61,8 +61,8 @@ G_END_DECLS
#define DEBUGGING gabble_debug_flag_is_set (DEBUG_FLAG)
-/* The same of DEBUG, printing also the object-path property for the TpProxy
- * passed as first arg. prepending '_' not not shadow any local variable */
+/* The same of DEBUG, printing also the object-path property for the TpProxy,
+ * passed as first arg. prepending '_' to avoid shadowing local variables */
#define PATH_DEBUG(_proxy, _format, ...) \
G_STMT_START { \
const gchar *_path; \
diff --git a/telepathy-logger/log-manager.c b/telepathy-logger/log-manager.c
index 98ebe37..01c83b1 100644
--- a/telepathy-logger/log-manager.c
+++ b/telepathy-logger/log-manager.c
@@ -151,6 +151,8 @@ tpl_log_manager_init (TplLogManager *self)
self->priv = priv;
+ DEBUG ("Initialising the Log Manager");
+
/* The TPL's default read-write logstore */
tplogger = g_object_new (TPL_TYPE_LOG_STORE_EMPATHY,
"name", TPL_LOG_MANAGER_LOG_STORE_DEFAULT,
@@ -158,7 +160,8 @@ tpl_log_manager_init (TplLogManager *self)
"readable", TRUE,
NULL);
if (tplogger == NULL)
- g_critical ("Error during TplLogStoreEmpathy (name=TpLogger) initialisation.");
+ g_critical ("Error during TplLogStoreEmpathy (name=TpLogger) "
+ "initialisation.");
else
{
/* manual registration, to set up priv->stores for
@@ -187,6 +190,9 @@ tpl_log_manager_init (TplLogManager *self)
/* internally referenced within register_logstore */
if (empathy != NULL)
g_object_unref (empathy);
+
+
+ DEBUG ("Log Manager initialised");
}
diff --git a/telepathy-logger/log-store-empathy.c b/telepathy-logger/log-store-empathy.c
index 14ce05f..e3893b3 100644
--- a/telepathy-logger/log-store-empathy.c
+++ b/telepathy-logger/log-store-empathy.c
@@ -437,8 +437,8 @@ _log_store_empathy_write_to_store (TplLogStore *self,
if (file != NULL)
fseek (file, -strlen (LOG_FOOTER), SEEK_END);
}
-
g_fprintf (file, "%s", entry);
+ DEBUG ("%s: written: %s", filename, entry);
fclose (file);
g_free (filename);