Only log to file if not logging to stdout

This commit is contained in:
Thor77 2017-02-27 12:40:30 +01:00
parent 8f49c3e95d
commit 6c35aed767
1 changed files with 2 additions and 1 deletions

View File

@ -77,10 +77,11 @@ def main(configuration):
logger.setLevel(logging.DEBUG) logger.setLevel(logging.DEBUG)
if configuration.getboolean('General', 'debugstdout'): if configuration.getboolean('General', 'debugstdout'):
stream_handler.setLevel(logging.DEBUG) stream_handler.setLevel(logging.DEBUG)
else:
logger.addHandler(file_handler)
# attach handlers # attach handlers
logger.addHandler(stream_handler) logger.addHandler(stream_handler)
logger.addHandler(file_handler)
idmap = configuration.get('General', 'idmap') idmap = configuration.get('General', 'idmap')
if idmap: if idmap: