summaryrefslogtreecommitdiff
path: root/telepathy-logger/log-manager.c
diff options
context:
space:
mode:
authorCosimo Alfarano <cosimo.alfarano@collabora.co.uk>2011-01-10 18:27:55 +0000
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2011-01-20 14:44:21 -0500
commitd2d196870295a3f9f71466f229c9adb2d5753d56 (patch)
treed564ccb00f7ac6f41b20eac6d98dc3749435b7d5 /telepathy-logger/log-manager.c
parent55076c2e9e1ec1f9fb02c16fc3b091eaa8182bab (diff)
downloadtelepathy-logger-d2d196870295a3f9f71466f229c9adb2d5753d56.tar.gz
set "testmode" property only on logstores supporting it
Diffstat (limited to 'telepathy-logger/log-manager.c')
-rw-r--r--telepathy-logger/log-manager.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/telepathy-logger/log-manager.c b/telepathy-logger/log-manager.c
index 8364b63..e2b1813 100644
--- a/telepathy-logger/log-manager.c
+++ b/telepathy-logger/log-manager.c
@@ -197,6 +197,13 @@ add_log_store (TplLogManager *self,
"writable", writable,
NULL);
+ /* set the log store in "testmode" if it supports it and the environment is
+ * currently in test mode */
+ if (g_object_class_find_property (G_OBJECT_GET_CLASS (store), "testmode"))
+ g_object_set (store,
+ "testmode", (g_getenv ("TPL_TEST_MODE") != NULL),
+ NULL);
+
if (store == NULL)
CRITICAL ("Error creating %s (name=%s)", g_type_name (type), name);
else if (!_tpl_log_manager_register_log_store (self, store))