summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Winter <phw@nymity.ch>2019-05-08 13:40:23 -0700
committerPhilipp Winter <phw@nymity.ch>2019-05-08 13:40:23 -0700
commit978f9be81c6e7110d8c40bc76b22230f87b1d988 (patch)
tree284585d945e22100fbc7b848d297439e96d25ece
parentd15fe16cfdbcf7514e74f537f78ba55bd7229dd8 (diff)
Provide more information in log messages.
Another attempt to get a better understanding of <https://bugs.torproject.org/30441>.
-rw-r--r--bridgedb/main.py7
1 files 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)