Fixed utf-8 logging on Windows

This commit is contained in:
RemixDev 2020-08-21 12:48:32 +02:00
parent 00885ae674
commit 56ebc0aa0f
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ class Settings:
makedirs(logspath, exist_ok=True)
# Add handler for logging
fh = logging.FileHandler(path.join(logspath, logfile))
fh = logging.FileHandler(path.join(logspath, logfile), 'w', 'utf-8')
fh.setLevel(logging.DEBUG)
fh.setFormatter(logging.Formatter('%(asctime)s - [%(levelname)s] %(message)s'))
logger.addHandler(fh)