[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [bridgedb/master] Cleanup the log statements for hashring prepopulation in bridgedb.Main.
commit 618ef22c9faa41e2a34a30d01f6c00390142414a
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date: Sun Jan 12 04:21:45 2014 +0000
Cleanup the log statements for hashring prepopulation in bridgedb.Main.
---
lib/bridgedb/Main.py | 27 +++++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/lib/bridgedb/Main.py b/lib/bridgedb/Main.py
index 6243017..24ec825 100644
--- a/lib/bridgedb/Main.py
+++ b/lib/bridgedb/Main.py
@@ -512,20 +512,31 @@ def startup(options):
state.proxyList.replaceProxyList(loadProxyList(cfg))
if emailDistributor is not None:
- logging.debug("Prepopulating email distributor hashrings...")
emailDistributor.prepopulateRings() # create default rings
- logging.info("Bridges allotted for email distribution: %d"
- % len(emailDistributor.splitter))
+ logging.info("Bridges allotted for %s distribution: %d"
+ % (emailDistributor.name,
+ len(emailDistributor.splitter)))
else:
logging.warn("No email distributor created!")
if ipDistributor is not None:
- logging.debug("Prepopulating HTTPS distributor hashrings...")
ipDistributor.prepopulateRings() # create default rings
- logging.info("Bridges allotted for web distribution: %d"
- % len(ipDistributor.splitter))
- for (n,(f,r)) in ipDistributor.splitter.filterRings.items():
- logging.info("\tby filter set %s, %d" % (n, len(r)))
+
+ logging.info("Bridges allotted for %s distribution: %d"
+ % (ipDistributor.name,
+ len(ipDistributor.splitter)))
+ logging.info("\tNum bridges:\tFilter set:")
+
+ nSubrings = 0
+ ipSubrings = ipDistributor.splitter.filterRings
+ for (ringname, (filterFn, subring)) in ipSubrings.items():
+ nSubrings += 1
+ filterSet = ' '.join(
+ ipDistributor.splitter.extractFilterNames(ringname))
+ logging.info("\t%2d bridges\t%s" % (len(subring), filterSet))
+
+ logging.info("Total subrings for %s: %d"
+ % (ipDistributor.name, nSubrings))
else:
logging.warn("No HTTP(S) distributor created!")
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits