Skip to content

Commit

Permalink
Make khoj logger use utf-8 encoding when writing to khoj log file
Browse files Browse the repository at this point in the history
Resolve logger error issue mentioned in #199
  • Loading branch information
debanjum committed Apr 17, 2023
1 parent dc3f399 commit d90df96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/khoj/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit d90df96

Please sign in to comment.