From ff48518e37bd6b95e1f70ae69cdbafa62b51451f Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 7 Nov 2017 20:14:54 -0600 Subject: [PATCH] handle --blur-usage= correctly, log it --- src/wormhole_transit_relay/server_tap.py | 2 +- src/wormhole_transit_relay/transit_server.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wormhole_transit_relay/server_tap.py b/src/wormhole_transit_relay/server_tap.py index 9e20810..c4223c0 100644 --- a/src/wormhole_transit_relay/server_tap.py +++ b/src/wormhole_transit_relay/server_tap.py @@ -27,7 +27,7 @@ class Options(usage.Options): ] def opt_blur_usage(self, arg): - self["blur_usage"] = int(arg) + self["blur-usage"] = int(arg) def makeService(config, reactor=reactor): diff --git a/src/wormhole_transit_relay/transit_server.py b/src/wormhole_transit_relay/transit_server.py index c8f1011..5fa6c90 100644 --- a/src/wormhole_transit_relay/transit_server.py +++ b/src/wormhole_transit_relay/transit_server.py @@ -224,6 +224,11 @@ class Transit(protocol.ServerFactory): def __init__(self, blur_usage, log_file, usage_db): self._blur_usage = blur_usage self._log_requests = blur_usage is None + if self._blur_usage: + log.msg("blurring access times to %d seconds" % self._blur_usage) + log.msg("not logging Transit connections to Twisted log") + else: + log.msg("not blurring access times") self._debug_log = False self._log_file = log_file self._db = None