From 6a5c4f834d9a5f50638ee51f2cb233a31a235c70 Mon Sep 17 00:00:00 2001 From: Barak Hoffer Date: Thu, 15 Oct 2015 10:13:40 +0300 Subject: [PATCH] fix no log file bug --- chaos_monkey/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chaos_monkey/main.py b/chaos_monkey/main.py index 2d1bf5299..e47d0f49d 100644 --- a/chaos_monkey/main.py +++ b/chaos_monkey/main.py @@ -74,6 +74,8 @@ def main(): if WormConfiguration.use_file_logging: LOG_CONFIG['handlers']['file']['filename'] = log_path LOG_CONFIG['root']['handlers'].append('file') + else: + del LOG_CONFIG['handlers']['file'] logging.config.dictConfig(LOG_CONFIG) LOG = logging.getLogger()