313 B

logag-python-handler

using

git+https://gitlab.com/logag/logag-python-handler.git

in code:

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})