diff --git a/README.md b/README.md index c3320d4..9910693 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,16 @@ ``` 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}) ``` \ No newline at end of file diff --git a/logag_handler/__init__.py b/logag_handler/__init__.py index 68da062..d2b492c 100644 --- a/logag_handler/__init__.py +++ b/logag_handler/__init__.py @@ -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) diff --git a/setup.py b/setup.py index 5f7cd9c..d20cb12 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name='logag-python-handler', - version='0.1.1', + version='0.1.2', packages=['logag_handler'], url='https://gitlab.com/logag/logag-python-handler', license='MIT',