handle --blur-usage= correctly, log it
This commit is contained in:
parent
9ccb0424b0
commit
ff48518e37
|
@ -27,7 +27,7 @@ class Options(usage.Options):
|
||||||
]
|
]
|
||||||
|
|
||||||
def opt_blur_usage(self, arg):
|
def opt_blur_usage(self, arg):
|
||||||
self["blur_usage"] = int(arg)
|
self["blur-usage"] = int(arg)
|
||||||
|
|
||||||
|
|
||||||
def makeService(config, reactor=reactor):
|
def makeService(config, reactor=reactor):
|
||||||
|
|
|
@ -224,6 +224,11 @@ class Transit(protocol.ServerFactory):
|
||||||
def __init__(self, blur_usage, log_file, usage_db):
|
def __init__(self, blur_usage, log_file, usage_db):
|
||||||
self._blur_usage = blur_usage
|
self._blur_usage = blur_usage
|
||||||
self._log_requests = blur_usage is None
|
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._debug_log = False
|
||||||
self._log_file = log_file
|
self._log_file = log_file
|
||||||
self._db = None
|
self._db = None
|
||||||
|
|
Loading…
Reference in New Issue
Block a user