(self, record: logging.LogRecord)
| 211 | """StreamHandler which switches line terminator by record.nonl flag.""" |
| 212 | |
| 213 | def emit(self, record: logging.LogRecord) -> None: |
| 214 | try: |
| 215 | self.acquire() |
| 216 | if getattr(record, 'nonl', False): |
| 217 | # skip appending terminator when nonl=True |
| 218 | self.terminator = '' |
| 219 | super().emit(record) |
| 220 | finally: |
| 221 | self.terminator = '\n' |
| 222 | self.release() |
| 223 | |
| 224 | |
| 225 | class MemoryHandler(logging.handlers.BufferingHandler): |
no test coverage detected