Fixed utf-8 logging on Windows
This commit is contained in:
parent
00885ae674
commit
56ebc0aa0f
|
@ -120,7 +120,7 @@ class Settings:
|
||||||
makedirs(logspath, exist_ok=True)
|
makedirs(logspath, exist_ok=True)
|
||||||
|
|
||||||
# Add handler for logging
|
# 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.setLevel(logging.DEBUG)
|
||||||
fh.setFormatter(logging.Formatter('%(asctime)s - [%(levelname)s] %(message)s'))
|
fh.setFormatter(logging.Formatter('%(asctime)s - [%(levelname)s] %(message)s'))
|
||||||
logger.addHandler(fh)
|
logger.addHandler(fh)
|
||||||
|
|
Loading…
Reference in New Issue