Sujet : Re: More systemdCrap
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.os.linux.miscDate : 11. Mar 2025, 22:05:45
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vqq8j8$25gtn$7@dont-email.me>
References : 1 2 3 4 5 6 7 8
User-Agent : Pan/0.162 (Pokrosvk)
On Tue, 11 Mar 2025 13:23:39 +0100, Carlos E.R. wrote:
What you can not do is remove content from the middle of the files.
Specifically remove some content and leave intact other content.
This is forbidden in the design of the systemd journal, the developers
refuse to do it.
When all else fails, read the documentation!
From the journald.conf man page
<
https://www.freedesktop.org/software/systemd/man/latest/journald.conf.html>,
note the options for forwarding journal entries to alternative
destinations:
ForwardToSyslog=, ForwardToKMsg=, ForwardToConsole=, ForwardToWall=, ForwardToSocket=
...
When forwarding over a socket the Journal Export Format is used
when sending over the wire. Notably this includes the metadata
field __REALTIME_TIMESTAMP so that systemd-journal-remote (see
systemd-journal-remote.service(8)) can be used to receive the
forwarded journal entries.
The Journal Export Format is documented here:
<
https://systemd.io/JOURNAL_EXPORT_FORMATS/>.
So the solution is simple: write your own socket listener which saves
journal records to your own rewritable format, e.g. an SQLite
database. You can then edit this to your heart’s content.