| Total Complexity | 4 |
| Total Lines | 15 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | from plugin.managers.exception import ExceptionManager |
||
| 7 | class ErrorStorage(logging.Handler): |
||
| 8 | def __init__(self): |
||
| 9 | super(ErrorStorage, self).__init__() |
||
| 10 | |||
| 11 | def emit(self, record): |
||
| 12 | if record.levelno < logging.ERROR: |
||
| 13 | return |
||
| 14 | |||
| 15 | if record.exc_info: |
||
| 16 | ExceptionManager.create.from_exc_info(record.exc_info) |
||
| 17 | return |
||
| 18 | |||
| 19 | self.format(record) |
||
| 20 | |||
| 21 | ExceptionManager.create.from_message(record.message) |
||
|
|
|||
| 22 | |||
| 24 |