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

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

Open pspacek opened this issue 4 years ago • 2 comments

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.

pspacek avatar Aug 11 '20 09:08 pspacek

Indeed. The relevant commit in systemd is systemd/systemd@ea18a4b57e2bb94af7b3ecb7abdaec40e9f485f0. It's been a while.

keszybz avatar Aug 13 '22 19:08 keszybz

@keszybz Is there any plan to work on this one? Or you are a wrong person to ask?

radekwlsk avatar Jan 12 '23 14:01 radekwlsk