@@ -43,7 +43,7 @@ def __init__(self):
4343 log_file_location = self .filepath
4444
4545 # create the logfile and write the headers
46- with open (self .filepath , "a" ) as log_file :
46+ with open (self .filepath , "a" , encoding = 'utf-8' ) as log_file :
4747 log_file .write (";" .join (self .headers ) + "\n " )
4848
4949 def emit (self , record : logging .LogRecord ):
@@ -52,7 +52,7 @@ def emit(self, record: logging.LogRecord):
5252 message = self .format (record )
5353
5454 # append to the logfile
55- with open (self .filepath , "a" ) as log_file :
55+ with open (self .filepath , "a" , encoding = 'utf-8' ) as log_file :
5656 log_file .write (message )
5757
5858 # if there's exception info, write the exception traceback to the file as well
@@ -136,7 +136,7 @@ def emit(self, record: logging.LogRecord):
136136 message = self .format_log (record )
137137
138138 # append to the logfile
139- with open (self .filepath , "a" ) as log_file :
139+ with open (self .filepath , "a" , encoding = 'utf-8' ) as log_file :
140140 log_file .write (message )
141141
142142 # if there's exception info, write the exception traceback to the file as well
0 commit comments