commit b8d228adc2d24891e49d53d62ff93f7b45041cc2 Author: Cecylia Bocovich cohosh@torproject.org Date: Wed Apr 29 14:12:34 2020 -0400
Set default log level for gettor to "info" --- gettor/utils/commons.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gettor/utils/commons.py b/gettor/utils/commons.py index b769efc..981a21b 100644 --- a/gettor/utils/commons.py +++ b/gettor/utils/commons.py @@ -10,11 +10,13 @@ # # :license: This is Free Software. See LICENSE for license information.
-from twisted.logger import Logger +from twisted.logger import Logger, LogLevel +from twisted.logger import FilteringLogObserver, LogLevelFilterPredicate from twisted.application import internet - # Define an application logger log = Logger(namespace="gettor") +predicate = LogLevelFilterPredicate(defaultLogLevel=LogLevel.info) +log.observer = FilteringLogObserver(log.observer, [predicate])
class BaseService(internet.TimerService): """