Skip to content

Commit

Permalink
Make sure we prevent encoding errors when writing to logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
kollivier committed Dec 16, 2020
1 parent bb55271 commit b80fa51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions project_info.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "8e33d642-00e1-4542-9848-018cce59189d",
"name": "Kolibri",
"version": "0.1.1",
"build_number": "28",
"version": "0.1.2",
"build_number": "29",
"identifier": "org.learningequality.Kolibri",
"requirements": {"android": ["python2","pyjnius","genericndkbuild", "sqlite3", "cryptography", "pyopenssl", "openssl", "six"]},
"whitelist_file": {"android": "whitelist.txt"},
Expand Down
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def get_home_folder():
os.makedirs(log_dir, exist_ok=True)
log_filename = os.path.join(log_dir, log_basename)
root_logger = logging.getLogger()
file_handler = KolibriTimedRotatingFileHandler(filename=log_filename, when='midnight', backupCount=30)
file_handler = KolibriTimedRotatingFileHandler(filename=log_filename, encoding='utf-8', when='midnight', backupCount=30)
root_logger.addHandler(file_handler)

# Since the log files can contain multiple runs, make the first printout very visible to quickly show
Expand Down

0 comments on commit b80fa51

Please sign in to comment.