[tor-commits] [bridgedb/master] Provide more information in log messages.

phw at torproject.org phw at torproject.org
Wed May 8 20:43:56 UTC 2019


commit 978f9be81c6e7110d8c40bc76b22230f87b1d988
Author: Philipp Winter <phw at nymity.ch>
Date:   Wed May 8 13:40:23 2019 -0700

    Provide more information in log messages.
    
    Another attempt to get a better understanding of
    <https://bugs.torproject.org/30441>.
---
 bridgedb/main.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/bridgedb/main.py b/bridgedb/main.py
index a707952..a513c70 100644
--- a/bridgedb/main.py
+++ b/bridgedb/main.py
@@ -178,8 +178,8 @@ def load(state, hashring, clear=False):
         blacklist = parseBridgeBlacklistFile(state.NO_DISTRIBUTION_FILE)
 
         inserted = 0
-        logging.info("Inserting %d bridges into hashring, %d of which have the "
-                     "'Running' flag..." % (len(bridges),
+        logging.info("Trying to insert %d bridges into hashring, %d of which "
+                     "have the 'Running' flag..." % (len(bridges),
                      len(filter(lambda b: b.flags.running, bridges.values()))))
 
         for fingerprint, bridge in bridges.items():
@@ -198,7 +198,8 @@ def load(state, hashring, clear=False):
                 # insertion process.
                 hashring.insert(bridge)
                 inserted += 1
-        logging.info("Done inserting %d bridges into hashring." % inserted)
+        logging.info("Tried to insert %d bridges into hashring.  Resulting "
+                     "hashring is of length %d." % (inserted, len(hashring)))
 
         if state.COLLECT_TIMESTAMPS:
             reactor.callInThread(updateBridgeHistory, bridges, timestamps)



More information about the tor-commits mailing list