]> git.ipfire.org Git - thirdparty/systemd.git/commit
journald: remove triplicate logging about failure to write log lines 26605/head
authorLennart Poettering <lennart@poettering.net>
Mon, 27 Feb 2023 14:48:45 +0000 (15:48 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 28 Feb 2023 08:32:42 +0000 (09:32 +0100)
commit0631aabdf567e5ce87166827e9645bc18083a7c9
tree75e521706186ef8dc2061e18186305ec22a198f0
parent32b0678c868b42ad68d383c8bf18fc2cdb1fbe95
journald: remove triplicate logging about failure to write log lines

Let's log exactly at one place about failed writing of log lines to
journal file: in shall_try_append_again().

Then, if we decide to suppress a retry-after-vacuum because we already
vacuumed anyway then say this explicitly as "supressed rotation",
because that's what we do here.

This removes triplicate logging about the same error, and logs exactly
once, plus optional one "suppressed rotation" message. (plus more debug
output). The triplicate logging was bad in particular because it had no
understanding of the actual error codes and just showed generic UNIX
error strings ("Not a XENIX named type file"). By relying on
shall_try_append_again() to do all logging we now get very clean error
strings for all conditions.

Fixes: #26496
src/journal/journald-server.c