Make khoj logger use utf-8 encoding when writing to khoj log file

Resolve logger error issue mentioned in #199
This commit is contained in:
Debanjum Singh Solanky 2023-04-17 16:03:01 +07:00
parent dc3f399f91
commit d90df966a9

View file

@ -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)