[Add]将日志文件改为UTF8编码,Close #1248
This commit is contained in:
parent
3fee9cb48e
commit
31784f32b6
@ -700,7 +700,7 @@ class LogEngine(object):
|
||||
if not filename:
|
||||
filename = 'vt_' + datetime.now().strftime('%Y%m%d') + '.log'
|
||||
filepath = getTempPath(filename)
|
||||
self.fileHandler = logging.FileHandler(filepath)
|
||||
self.fileHandler = logging.FileHandler(filepath, mode='w', encoding='utf-8')
|
||||
self.fileHandler.setLevel(self.level)
|
||||
self.fileHandler.setFormatter(self.formatter)
|
||||
self.logger.addHandler(self.fileHandler)
|
||||
|
Loading…
Reference in New Issue
Block a user