From 215a0f350b1bae30cef774ec89ee2afdfd2b8f94 Mon Sep 17 00:00:00 2001 From: meejah Date: Fri, 12 Feb 2021 17:47:26 -0700 Subject: [PATCH] restore 2 missing log-lines --- src/wormhole_transit_relay/server_state.py | 6 ++++++ src/wormhole_transit_relay/transit_server.py | 8 -------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/wormhole_transit_relay/server_state.py b/src/wormhole_transit_relay/server_state.py index 9f83736..60e3101 100644 --- a/src/wormhole_transit_relay/server_state.py +++ b/src/wormhole_transit_relay/server_state.py @@ -8,6 +8,7 @@ from zope.interface import ( Attribute, implementer, ) +from twisted.python import log from .database import get_db @@ -170,6 +171,11 @@ class UsageTracker(object): """ self._backends = set() self._blur_usage = blur_usage + if blur_usage: + log.msg("blurring access times to %d seconds" % self._blur_usage) +## XXX log.msg("not logging Transit connections to Twisted log") + else: + log.msg("not blurring access times") def add_backend(self, backend): """ diff --git a/src/wormhole_transit_relay/transit_server.py b/src/wormhole_transit_relay/transit_server.py index a897bd4..29e3279 100644 --- a/src/wormhole_transit_relay/transit_server.py +++ b/src/wormhole_transit_relay/transit_server.py @@ -250,14 +250,6 @@ class Transit(protocol.ServerFactory): self.active_connections = ActiveConnections() self.pending_requests = PendingRequests(self.active_connections) self.usage = usage - if False: - # these logs-message should be made by the usage-tracker - # .. or in the "tap" setup? - if 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._rebooted = time.time()