From f0bc0f18f4666421e4cf4a1fec2ef460dea845b0 Mon Sep 17 00:00:00 2001 From: to-bar <46519524+to-bar@users.noreply.github.com> Date: Wed, 16 Oct 2019 19:25:06 +0200 Subject: [PATCH 1/3] Fixed RotatingFileHandler permission error --- core/src/epicli/cli/helpers/Log.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/epicli/cli/helpers/Log.py b/core/src/epicli/cli/helpers/Log.py index fd3bb008f7..fab6d8cc5c 100644 --- a/core/src/epicli/cli/helpers/Log.py +++ b/core/src/epicli/cli/helpers/Log.py @@ -17,14 +17,14 @@ def __init__(self): log_path = os.path.join(get_output_path(), config.log_file) logging.basicConfig(level=logging.INFO, format=config.log_format, datefmt=config.log_date_format) formatter = jsonlogger.JsonFormatter(config.log_format, datefmt=config.log_date_format) - self.json_file_handler = logging.FileHandler(filename=log_path) - self.json_file_handler.setFormatter(formatter) - self.json_stream_handler = logging.StreamHandler() - self.json_stream_handler.setFormatter(formatter) + handler = logging.handlers.RotatingFileHandler(log_path, backupCount=config.log_count) should_roll_over = os.path.isfile(log_path) - handler = logging.handlers.RotatingFileHandler(log_path, mode='w', backupCount=config.log_count) if should_roll_over: handler.doRollover() + self.json_file_handler = handler + self.json_file_handler.setFormatter(formatter) + self.json_stream_handler = logging.StreamHandler() + self.json_stream_handler.setFormatter(formatter) instance = None From 3cc2788036cab19ef89faba62c90c5136ad380b3 Mon Sep 17 00:00:00 2001 From: to-bar <46519524+to-bar@users.noreply.github.com> Date: Thu, 17 Oct 2019 09:56:43 +0200 Subject: [PATCH 2/3] Changed order after tests --- core/src/epicli/cli/helpers/Log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/epicli/cli/helpers/Log.py b/core/src/epicli/cli/helpers/Log.py index fab6d8cc5c..89440cb1d4 100644 --- a/core/src/epicli/cli/helpers/Log.py +++ b/core/src/epicli/cli/helpers/Log.py @@ -17,8 +17,8 @@ def __init__(self): log_path = os.path.join(get_output_path(), config.log_file) logging.basicConfig(level=logging.INFO, format=config.log_format, datefmt=config.log_date_format) formatter = jsonlogger.JsonFormatter(config.log_format, datefmt=config.log_date_format) - handler = logging.handlers.RotatingFileHandler(log_path, backupCount=config.log_count) should_roll_over = os.path.isfile(log_path) + handler = logging.handlers.RotatingFileHandler(log_path, backupCount=config.log_count) if should_roll_over: handler.doRollover() self.json_file_handler = handler From 16fbdbe11ab3e0ddca10ccaec8496aa4a476c076 Mon Sep 17 00:00:00 2001 From: to-bar <46519524+to-bar@users.noreply.github.com> Date: Thu, 17 Oct 2019 10:18:02 +0200 Subject: [PATCH 3/3] Added info to changelog --- CHANGELOG-0.4.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG-0.4.md b/CHANGELOG-0.4.md index a47bb73b1f..2a46929ba4 100644 --- a/CHANGELOG-0.4.md +++ b/CHANGELOG-0.4.md @@ -5,6 +5,7 @@ ### Fixed - [#613](https://github.com/epiphany-platform/epiphany/pull/613) - Hotfixes for Ubuntu offline installation in air-gap mode +- [#614](https://github.com/epiphany-platform/epiphany/pull/614) - Fixed RotatingFileHandler permission error (for Docker Toolbox on Windows) ## [0.4.0] 2019-10-11