Skip to content

Commit

Permalink
Fixed RotatingFileHandler permission error (for Docker Toolbox on Win…
Browse files Browse the repository at this point in the history
  • Loading branch information
to-bar authored Oct 17, 2019
1 parent e4f8e10 commit 8acc67b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-0.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions core/src/epicli/cli/helpers/Log.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
should_roll_over = os.path.isfile(log_path)
handler = logging.handlers.RotatingFileHandler(log_path, mode='w', backupCount=config.log_count)
handler = logging.handlers.RotatingFileHandler(log_path, 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

Expand Down

0 comments on commit 8acc67b

Please sign in to comment.