From 457817304a5d288768199482ffe9c66ee355bb3e Mon Sep 17 00:00:00 2001 From: Vishesh Jain Date: Wed, 11 Mar 2020 12:42:49 +0530 Subject: [PATCH] CP 98a1ca97769d51afac559cc9c967939cd0954c58: [AIRFLOW-6625] Explicitly log using utf-8 encoding (#7247) (#31) --- airflow/utils/log/file_task_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/utils/log/file_task_handler.py b/airflow/utils/log/file_task_handler.py index 111f26c279cf0..c1c32658a164a 100644 --- a/airflow/utils/log/file_task_handler.py +++ b/airflow/utils/log/file_task_handler.py @@ -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)