Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

JournalHandler incorrectly send exception info

Open
#66 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
observability

Research direction

Start in systemd/journal.py at lines 581-586, then read the referenced Python logging implementations for exc_text, exc_info, and stack_info. Confirm how JournalHandler currently sends exception data, and consider the requested exception representation and stack information; done means the journal receives the useful exception details without the unnecessary tuple stringification.

Written by the indexing model from the issue text.

Description

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.

Dominant language
C
Stars
522
Forks
79
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from systemd/python-systemd

All issues in systemd/python-systemd

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.