[california/wip/732671-double: 8/10] Add thread ID to EDS debug logging



commit 88816993e7d735925a94d6607e879b619236aaec
Author: Jim Nelson <jim yorba org>
Date:   Wed Sep 10 12:59:30 2014 -0700

    Add thread ID to EDS debug logging

 .../backing-eds-calendar-source-subscription.vala  |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/src/backing/eds/backing-eds-calendar-source-subscription.vala 
b/src/backing/eds/backing-eds-calendar-source-subscription.vala
index e6a0af3..e68b5e3 100644
--- a/src/backing/eds/backing-eds-calendar-source-subscription.vala
+++ b/src/backing/eds/backing-eds-calendar-source-subscription.vala
@@ -4,6 +4,8 @@
  * (version 2.1 or later).  See the COPYING file in this distribution.
  */
 
+extern ulong pthread_self();
+
 namespace California.Backing {
 
 /**
@@ -117,7 +119,9 @@ internal class EdsCalendarSourceSubscription : CalendarSourceSubscription {
         InstanceNotifier notifier) {
         foreach (unowned iCal.icalcomponent ical_component in ical_components) {
             if (!is_discovered) {
-                debug("%s component added: %s is_instance=%s has_recurrences=%s", to_string(),
+                debug("[%s] %s component added: %s is_instance=%s has_recurrences=%s",
+                    pthread_self().to_string(),
+                    to_string(),
                     ical_component.get_uid(),
                     E.Util.component_is_instance(ical_component).to_string(),
                     E.Util.component_has_recurrences(ical_component).to_string());
@@ -179,7 +183,9 @@ internal class EdsCalendarSourceSubscription : CalendarSourceSubscription {
     private void on_objects_modified(SList<unowned iCal.icalcomponent> ical_components) {
         SList<unowned iCal.icalcomponent> add_list = new SList<unowned iCal.icalcomponent>();
         foreach (unowned iCal.icalcomponent ical_component in ical_components) {
-            debug("%s component modified: %s is_instance=%s has_recurrences=%s", to_string(),
+            debug("[%s] %s component modified: %s is_instance=%s has_recurrences=%s",
+                pthread_self().to_string(),
+                to_string(),
                 ical_component.get_uid(),
                 E.Util.component_is_instance(ical_component).to_string(),
                 E.Util.component_has_recurrences(ical_component).to_string());
@@ -272,8 +278,15 @@ internal class EdsCalendarSourceSubscription : CalendarSourceSubscription {
     }
     
     private void on_objects_removed(SList<unowned E.CalComponentId?> ids) {
-        foreach (unowned E.CalComponentId id in ids)
+        foreach (unowned E.CalComponentId id in ids) {
+            debug("[%s] %s removed %s",
+                pthread_self().to_string(),
+                to_string(),
+                id.uid
+            );
+            
             notify_master_removed(new Component.UID(id.uid));
+        }
     }
 }
 


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