python-systemd icon indicating copy to clipboard operation
python-systemd copied to clipboard

JournalHandler incorrectly send exception info

Open nikitych opened this issue 7 years ago • 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.

nikitych avatar Nov 12 '18 15:11 nikitych