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 authored and auvipy committed Sep 28, 2020
1 parent 5e05400 commit ea37db1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion celery/app/log.py
Expand Up @@ -226,7 +226,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 ea37db1

Please sign in to comment.