(self, record)
| 54 | return isatty and isatty() and not self.disable_coloring |
| 55 | |
| 56 | def emit(self, record): |
| 57 | try: |
| 58 | message = stdoutEncode(self.format(record)) |
| 59 | stream = self.stream |
| 60 | |
| 61 | if not self.is_tty: |
| 62 | if message and message[0] == "\r": |
| 63 | message = message[1:] |
| 64 | stream.write(message) |
| 65 | else: |
| 66 | self.output_colorized(message) |
| 67 | stream.write(getattr(self, 'terminator', '\n')) |
| 68 | |
| 69 | self.flush() |
| 70 | except (KeyboardInterrupt, SystemExit): |
| 71 | raise |
| 72 | except IOError: |
| 73 | pass |
| 74 | except: |
| 75 | self.handleError(record) |
| 76 | |
| 77 | if not IS_WIN: |
| 78 | def output_colorized(self, message): |
nothing calls this directly
no test coverage detected