]> git.ipfire.org Git - thirdparty/systemd.git/commit
journal: Don't discard kmsg messages coming from journald itself
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 11 Oct 2021 13:05:08 +0000 (14:05 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 18 Nov 2021 19:37:17 +0000 (19:37 +0000)
commit9c4161800898513914f2c99faefe528c1aecbd40
tree282916ff624c529f3d00bab5176a9f5965843fe0
parent86bd939d7fe840d4a9e413f65143fc01090314f8
journal: Don't discard kmsg messages coming from journald itself

Previously, we discarded any kmsg messages coming from journald
itself to avoid infinite loops where potentially the processing
of a kmsg message causes journald to log one or more messages to
kmsg which then get read again by the kmsg handler, ...

However, if we completely disable logging whenever we're processing
a kmsg message coming from journald itself, we also prevent any
infinite loops as we can be sure that journald won't accidentally
generate logging messages while processing a kmsg log message.

This change allows us to store all journald logs generated during
the processing of log messages from other services in the system
journal. Previously these could only be found in kmsg which has
low retention, can't be queried using journalctl and whose logs
don't survive reboots.
src/basic/log.c
src/basic/log.h
src/journal/journald-kmsg.c
src/journal/journald-server.c
src/journal/journald-server.h