fix: use BaseException instead of Exception, up to 0.1.2
This commit is contained in:
parent
98e9c9a122
commit
0702291c26
12
README.md
12
README.md
@ -5,3 +5,15 @@
|
||||
```
|
||||
git+https://gitlab.com/logag/logag-python-handler.git
|
||||
```
|
||||
|
||||
in code:
|
||||
```python
|
||||
import logging
|
||||
from xid import Xid
|
||||
|
||||
log = logging.getLogger()
|
||||
try:
|
||||
a = 1/0
|
||||
except Exception as e:
|
||||
log.warning("Test", exc_info=e, extra={'request_id': "123123123", 'xid': Xid().string})
|
||||
```
|
@ -63,5 +63,5 @@ class LogagHandler(logging.Handler):
|
||||
}
|
||||
|
||||
self.__send_to_udp(json_)
|
||||
except Exception as e:
|
||||
except BaseException as e:
|
||||
self.backup_handler.emit(record)
|
||||
|
Loading…
x
Reference in New Issue
Block a user