handle --blur-usage= correctly, log it

This commit is contained in:
Brian Warner 2017-11-07 20:14:54 -06:00
parent 9ccb0424b0
commit ff48518e37
2 changed files with 6 additions and 1 deletions

View File

@ -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):

View File

@ -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