Skip to content

Commit

Permalink
[AIRFLOW-6625] Explicitly log using utf-8 encoding (apache#7247)
Browse files Browse the repository at this point in the history
This is the standard encoding supported by Airflow. We should be explicit about logging using
this encoding.
  • Loading branch information
s-mcqueen authored and a-pertsev committed Oct 1, 2020
1 parent 456872f commit a076db7
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 @@ -53,7 +53,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')
if self.formatter:
self.handler.setFormatter(self.formatter)
self.handler.setLevel(self.level)
Expand Down

0 comments on commit a076db7

Please sign in to comment.