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
@ -4,4 +4,16 @@
|
|||||||
|
|
||||||
```
|
```
|
||||||
git+https://gitlab.com/logag/logag-python-handler.git
|
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_)
|
self.__send_to_udp(json_)
|
||||||
except Exception as e:
|
except BaseException as e:
|
||||||
self.backup_handler.emit(record)
|
self.backup_handler.emit(record)
|
||||||
|
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='logag-python-handler',
|
name='logag-python-handler',
|
||||||
version='0.1.1',
|
version='0.1.2',
|
||||||
packages=['logag_handler'],
|
packages=['logag_handler'],
|
||||||
url='https://gitlab.com/logag/logag-python-handler',
|
url='https://gitlab.com/logag/logag-python-handler',
|
||||||
license='MIT',
|
license='MIT',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user