Skip to content

Commit

Permalink
Specify utf-8 as the encoding for log files.
Browse files Browse the repository at this point in the history
Fixes #5144.
  • Loading branch information
thedrow committed Sep 21, 2020
1 parent 5a0c458 commit 1b30740
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion celery/app/log.py
Expand Up @@ -221,7 +221,7 @@ def _detect_handler(self, logfile=None):
logfile = sys.__stderr__ if logfile is None else logfile
if hasattr(logfile, 'write'):
return logging.StreamHandler(logfile)
return WatchedFileHandler(logfile)
return WatchedFileHandler(logfile, encoding='utf-8')

def _has_handler(self, logger):
return any(
Expand Down

0 comments on commit 1b30740

Please sign in to comment.