systemd/python-systemd

JournalHandler incorrectly send exception info

nikitych opened this issue · 0 comments

https://github.com/systemd/python-systemd/blob/master/systemd/journal.py#L581-L586

record.exc_text is a cache for text representation of record.exc_info https://github.com/python/cpython/blob/master/Lib/logging/__init__.py#L335
record.exc_info is a tuple https://github.com/python/cpython/blob/master/Lib/logging/__init__.py#L1579
So send str(record.exc_info) is unnecessary. There is a default implementation in formatter https://github.com/python/cpython/blob/master/Lib/logging/__init__.py#L681-L689

Also we send information about exception but no record.stack_info it's could be useful as well.