Skip to content

Commit

Permalink
Delay log file creation
Browse files Browse the repository at this point in the history
  • Loading branch information
wigging committed Jan 9, 2025
1 parent a1f51cf commit e0d365e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flowcept/commons/flowcept_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _build_logger(cls):
logger.addHandler(stream_handler)

if file_level <= logging.CRITICAL:
file_handler = logging.FileHandler(LOG_FILE_PATH, mode="a+")
file_handler = logging.FileHandler(LOG_FILE_PATH, delay=True, mode="a+")
file_handler.setLevel(file_level)
file_format = logging.Formatter(f"[%(asctime)s]{_BASE_FORMAT}")
file_handler.setFormatter(file_format)
Expand Down

0 comments on commit e0d365e

Please sign in to comment.