Skip to content

Commit

Permalink
Merge pull request #1252 from PyPlanet/bugfix/1089
Browse files Browse the repository at this point in the history
Added delay to TimedRotatingFileHandler to avoid logging errors on date switch.
  • Loading branch information
TheMaximum committed Aug 23, 2023
2 parents c796984 + e1f4c83 commit 4cde2cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyplanet/utils/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def initiate_logger(): # pragma: no cover
# Determinate handler and initiate it.
if settings.LOGGING_ROTATE_LOGS:
handler = logging.handlers.TimedRotatingFileHandler(
path, when='D', interval=1, backupCount=14, encoding='utf-8'
path, when='D', interval=1, backupCount=14, encoding='utf-8', delay=True
)
else:
handler = logging.FileHandler(
Expand Down

0 comments on commit 4cde2cb

Please sign in to comment.