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

journal.Reader.add_match() does not support glob matching

Open
#86 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, python

Research direction

Start in _reader.c and reproduce the journal.Reader.add_match(_SYSTEMD_UNIT="kres*") case described in the issue, comparing it with journalctl -u 'kres*'. Trace how matches are passed to the systemd journal API and determine the scope needed for glob support. Done means the Python API returns matching units such as kresd@dns1 and kres-cache-gc, with coverage for the behavior if an existing test location is found.

Written by the indexing model from the issue text.

Description

Versions:

  • Debian 9 (Stretch)
  • python3 3.5.3-1
  • python3-system 233-1
  • systemd 232-25+deb9u
    ... but as far as I can tell from _reader.c it applies to master (a402d08da41413507a4ebebf18de897f7ddf1dd2) as well.

For example:

journal_reader.add_match(_SYSTEMD_UNIT="kres*")

always returns empty output. At the same time command journalctl -u 'kres*' lists log for units kresd@dns1, kresd@dns2, kres-cache-gc etc.

It would be nice if the Python API could do the same. For now I'm going to resort calling journalctl as subprocess.

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.