19 lines
313 B
Markdown
19 lines
313 B
Markdown
# logag-python-handler
|
|
|
|
## using
|
|
|
|
```
|
|
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})
|
|
``` |