[gnome-control-center/gnome-3-30] object-cache: Add more debug messages



commit 928ac108d54fda9967d7bfe7024d082c563b0935
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Sep 25 21:01:14 2018 -0300

    object-cache: Add more debug messages
    
    Enough to ask users to run Settings with "G_MESSAGES_DEBUG=all"
    and get some meaningful output.

 shell/cc-object-storage.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/shell/cc-object-storage.c b/shell/cc-object-storage.c
index 2865a3661..71e1c5472 100644
--- a/shell/cc-object-storage.c
+++ b/shell/cc-object-storage.c
@@ -239,6 +239,8 @@ cc_object_storage_create_dbus_proxy_sync (GBusType          bus_type,
 
   key = g_strdup_printf ("CcObjectStorage::dbus-proxy(%s,%s,%s)", name, path, interface);
 
+  g_debug ("Creating D-Bus proxy for %s", key);
+
   /* Check if a DBus proxy with that signature is already available; if it is,
    * return that instead of a new one.
    */
@@ -315,6 +317,8 @@ cc_object_storage_create_dbus_proxy (GBusType             bus_type,
   /* Check if the D-Bus proxy is already created */
   key = g_strdup_printf ("CcObjectStorage::dbus-proxy(%s,%s,%s)", name, path, interface);
 
+  g_debug ("Asynchronously creating D-Bus proxy for %s", key);
+
   if (g_hash_table_contains (_instance->id_to_object, key))
     {
       /* Mark this GTask as already cached, so we can call the right assertions
@@ -364,6 +368,13 @@ cc_object_storage_create_dbus_proxy_finish (GAsyncResult  *result,
   task_data = g_task_get_task_data (task);
   g_assert (task_data != NULL);
 
+  key = g_strdup_printf ("CcObjectStorage::dbus-proxy(%s,%s,%s)",
+                         task_data->name,
+                         task_data->path,
+                         task_data->interface);
+
+  g_debug ("Finished creating D-Bus proxy for %s", key);
+
   /* Retrieve the newly created proxy */
   proxy = g_task_propagate_pointer (task, &local_error);
 
@@ -374,11 +385,6 @@ cc_object_storage_create_dbus_proxy_finish (GAsyncResult  *result,
       return NULL;
     }
 
-  key = g_strdup_printf ("CcObjectStorage::dbus-proxy(%s,%s,%s)",
-                         task_data->name,
-                         task_data->path,
-                         task_data->interface);
-
   /* Either we have the object stored right when trying to create it - in which case,
    * task_data->cached == TRUE and cc_object_storage_has_object (key) == TRUE - or we
    * didn't have a cached proxy before, and we shouldn't have it now.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]