(self, text)
| 49 | self.opened = True |
| 50 | |
| 51 | def __log(self, text): |
| 52 | if not self.opened: |
| 53 | LOGGER.exception('Attempt to write to not opened logger') |
| 54 | return |
| 55 | |
| 56 | if not self.log_file: |
| 57 | return |
| 58 | |
| 59 | try: |
| 60 | if text is not None: |
| 61 | self.log_file.write(text.encode(ENCODING)) |
| 62 | self.log_file.flush() |
| 63 | except: |
| 64 | LOGGER.exception("Couldn't write to the log file") |
| 65 | |
| 66 | def _close(self): |
| 67 | try: |
no test coverage detected