From 898d45e4b59948b46e41ca01bd4ee20f455bb28b Mon Sep 17 00:00:00 2001 From: K4YT3X Date: Fri, 17 Jul 2020 14:48:57 -0400 Subject: [PATCH] opening log file with UTF-8 encoding to avoid compatibility problems --- src/bilogger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bilogger.py b/src/bilogger.py index 0e90a94..cbb23d7 100755 --- a/src/bilogger.py +++ b/src/bilogger.py @@ -4,7 +4,7 @@ Creator: Video2X Bidirectional Logger Author: K4YT3X Date Created: June 4, 2020 -Last Modified: June 4, 2020 +Last Modified: July 17, 2020 """ # built-in imports @@ -27,7 +27,7 @@ class BiLogger(object): logfile (pathlib.Path): target log file path object """ self.terminal = terminal - self.log = logfile.open(mode='a+') + self.log = logfile.open(mode='a+', encoding='utf-8') def write(self, message: str): """ write message to original terminal output and log file