From cd646e20898d4edcd8f381837589ed8411e230fe Mon Sep 17 00:00:00 2001 From: Benjamin Dweck Date: Tue, 2 Feb 2021 10:48:19 +0200 Subject: [PATCH] added debug logging --- syncthing_monitor/__main__.py | 2 ++ syncthing_monitor/etcd_client.py | 1 + 2 files changed, 3 insertions(+) diff --git a/syncthing_monitor/__main__.py b/syncthing_monitor/__main__.py index 1a47c30..f0a76cd 100644 --- a/syncthing_monitor/__main__.py +++ b/syncthing_monitor/__main__.py @@ -67,7 +67,9 @@ class SyncthingMonitor: [{'id': self.my_device_id}]) self.syncthing.sync_config() + print("Registering etcd update callback...", flush=True) self.etcd.register_device_update_handler(self.update_devices) + print("Attempting to add this device to etcd...", flush=True) self.etcd.add_device_to_cluster(self.my_device_id, self.syncthing_node_name, self.syncthing_publish_address) self.loop() diff --git a/syncthing_monitor/etcd_client.py b/syncthing_monitor/etcd_client.py index 6ef809f..51cfc09 100644 --- a/syncthing_monitor/etcd_client.py +++ b/syncthing_monitor/etcd_client.py @@ -12,6 +12,7 @@ class EtcdClient: self.key = key def load_cluster_info(self): + print("Retrieving cluster info from etcd...", flush=True) raw_value = self.etcd.get(self.key)[0] if raw_value is None: return {'devices': []}