From a495609ef6bb3f55b3be53372595056af7c5377b Mon Sep 17 00:00:00 2001 From: Josh Temple <8672171+joshtemple@users.noreply.github.com> Date: Thu, 11 Jun 2020 08:22:17 -0500 Subject: [PATCH] Log with UTF-8 to file --- spectacles/logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spectacles/logger.py b/spectacles/logger.py index 4095c71a..742b0316 100644 --- a/spectacles/logger.py +++ b/spectacles/logger.py @@ -33,7 +33,7 @@ def set_file_handler(log_dir: str) -> None: # Create subfolder to save the SQL for failed queries (log_dir_path / "queries").mkdir(exist_ok=True) - fh = logging.FileHandler(LOG_FILEPATH) + fh = logging.FileHandler(LOG_FILEPATH, encoding="utf-8") fh.setLevel(logging.DEBUG) formatter = FileFormatter("%(asctime)s %(levelname)s | %(message)s")