From 1ed378e9218e960f06bafe009d13ade252cc466b Mon Sep 17 00:00:00 2001 From: "stefan.schirmeister" Date: Wed, 2 Aug 2023 13:54:10 +0200 Subject: [PATCH] set log file encoding to UTF-8 --- ebus_toolbox/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ebus_toolbox/util.py b/ebus_toolbox/util.py index 3f40d4ed..323d376e 100644 --- a/ebus_toolbox/util.py +++ b/ebus_toolbox/util.py @@ -230,7 +230,7 @@ def setup_logging(args, time_str): log_name = f"{time_str}.log" log_path = args.output_directory / log_name print(f"Writing log to {log_path}") - log_handlers.append(logging.FileHandler(log_path)) + log_handlers.append(logging.FileHandler(log_path, encoding='utf-8')) logging.basicConfig( level=vars(logging)[args.loglevel], format="%(asctime)s [%(levelname)s] %(message)s",