From d90df966a9fd2e62250dbbc922210707b486c796 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Mon, 17 Apr 2023 16:03:01 +0700 Subject: [PATCH] Make khoj logger use utf-8 encoding when writing to khoj log file Resolve logger error issue mentioned in #199 --- src/khoj/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/khoj/main.py b/src/khoj/main.py index a54b2b4d3..bfaec2868 100644 --- a/src/khoj/main.py +++ b/src/khoj/main.py @@ -57,7 +57,7 @@ def run(): logger.setLevel(logging.DEBUG) # Set Log File - fh = logging.FileHandler(state.config_file.parent / "khoj.log") + fh = logging.FileHandler(state.config_file.parent / "khoj.log", encoding="utf-8") fh.setLevel(logging.DEBUG) logger.addHandler(fh)