def log_error(self, text: str) -> None:
if self.log_errors:<EOL><INDENT>with self._log_fp.open('<STR_LIT>') as log_file:<EOL><INDENT>log_file.write(f'<STR_LIT>')<EOL><DEDENT><DEDENT>
Given some error text it will log the text if self.log_errors is True

:param text: Error text to log