diff --git a/services/log_service.py b/services/log_service.py index 09bf231..c44e6c1 100644 --- a/services/log_service.py +++ b/services/log_service.py @@ -89,7 +89,8 @@ class LogService: runtime_handler = logging.handlers.RotatingFileHandler( self.log_dir / "runtime" / runtime_log_file, maxBytes=self._parse_size(self.config['logging'].get('max_file_size', '10MB')), - backupCount=self.config['logging'].get('max_log_files', 3) + backupCount=self.config['logging'].get('max_log_files', 3), + encoding='utf-8' ) runtime_handler.setLevel(getattr(logging, self.config['logging']['level'], logging.INFO)) runtime_handler.setFormatter(file_formatter) @@ -101,7 +102,8 @@ class LogService: debug_handler = logging.handlers.RotatingFileHandler( self.log_dir / "debug" / debug_log_file, maxBytes=self._parse_size(self.config['logging'].get('max_file_size', '10MB')), - backupCount=self.config['logging'].get('max_log_files', 3) + backupCount=self.config['logging'].get('max_log_files', 3), + encoding='utf-8' ) debug_handler.setLevel(logging.DEBUG) debug_handler.setFormatter(file_formatter)