- 
                Notifications
    
You must be signed in to change notification settings  - Fork 69
 
Open
Description
This code was working on Ubuntu 22.04, with python3-systemd version 234:
    j = systemd.journal.Reader()
    j.this_boot()
    j.log_level(systemd.journal.LOG_INFO)
    j.add_match(SYSLOG_IDENTIFIER="kernel")
    # Seek to the end of the journal to only capture new entries
    j.seek_tail()
    while True:
        if j.wait(10):
            for entry in j:
              # do thingsBut on Ubuntu 24.04 and python3-systemd version 235, it is not working anymore. Especially, the "for" loop does not encounter any item. If we try to run next(j) it immediately raises StopIteration, even if j.wait(timeout) returned APPEND.
I also tried the "Example: polling for journal events" code from the documentation (https://www.freedesktop.org/software/systemd/python-systemd/journal.html#example-polling-for-journal-events) and it is not working.
Metadata
Metadata
Assignees
Labels
No labels