Skip to content

Commit

Permalink
[AIRFLOW-6625] Explicitly log using utf-8 encoding (apache#7247) (apa…
Browse files Browse the repository at this point in the history
…che#31)

This is the standard encoding supported by Airflow. We should be explicit about logging using
this encoding.
  • Loading branch information
Sean McQueen committed Jan 24, 2020
1 parent 6a7505b commit 98a1ca9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion airflow/utils/log/file_task_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def set_context(self, ti):
:param ti: task instance object
"""
local_loc = self._init_file(ti)
self.handler = logging.FileHandler(local_loc)
self.handler = logging.FileHandler(local_loc, encoding='utf-8')
self.handler.setFormatter(self.formatter)
self.handler.setLevel(self.level)

Expand Down

0 comments on commit 98a1ca9

Please sign in to comment.