Skip to content

Commit

Permalink
ensure utf-8 encoding in file-logger as well
Browse files Browse the repository at this point in the history
  • Loading branch information
bimac committed Feb 1, 2024
1 parent 8905b4e commit 8332461
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iblutil/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def log_to_file(log='ibl', filename=None):
elif not Path(filename).is_absolute():
filename = Path.home().joinpath('.ibl_logs', filename)
filename.parent.mkdir(exist_ok=True)
file_handler = logging.FileHandler(filename)
file_handler = logging.FileHandler(filename, encoding='utf-8')
file_format = logging.Formatter(LOG_FORMAT_STR, LOG_DATE_FORMAT)
file_handler.setFormatter(file_format)
file_handler.name = f'{log.name}_file'
Expand Down

0 comments on commit 8332461

Please sign in to comment.