From 501005d7d54bd57a37df4777154f0e47e4dc622c Mon Sep 17 00:00:00 2001 From: drebs Date: Sun, 6 Nov 2016 12:58:01 -0200 Subject: [feat] increase verbosity using command line --- src/leap/bitmask/core/bitmaskd.tac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/leap/bitmask/core/bitmaskd.tac') diff --git a/src/leap/bitmask/core/bitmaskd.tac b/src/leap/bitmask/core/bitmaskd.tac index 0ab44ff..e2733f9 100644 --- a/src/leap/bitmask/core/bitmaskd.tac +++ b/src/leap/bitmask/core/bitmaskd.tac @@ -12,6 +12,7 @@ from twisted.logger import LogLevel from twisted.logger import LogLevelFilterPredicate from twisted.logger import formatEventAsClassicLogText as formatEvent +from leap.bitmask.core import flags from leap.bitmask.core.service import BitmaskBackend from leap.bitmask.core.logs import logFileFactory @@ -21,7 +22,7 @@ application = service.Application("bitmaskd") # configure logging log_file = logFileFactory() file_observer = FileLogObserver(log_file, formatEvent) -level = LogLevel.debug if os.environ.get('BITMASK_DEBUG') else LogLevel.info +level = LogLevel.debug if flags.VERBOSE else LogLevel.info predicate = LogLevelFilterPredicate(defaultLogLevel=level) observer = FilteringLogObserver(file_observer, [predicate]) application.setComponent(ILogObserver, observer) -- cgit v1.2.3