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()