From: Daan De Meyer Date: Wed, 5 Jan 2022 10:24:20 +0000 (+0000) Subject: journal: Log a better message when we're rotating because a file is full X-Git-Tag: v251-rc1~588^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eff79e4e22e7c745fea259c4414f685363d9f16a;p=thirdparty%2Fsystemd.git journal: Log a better message when we're rotating because a file is full The previous message was confusing errors. When we're rotating because we've reached the file size limit, let's log a better message. Fixes #22007. --- diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index a244d9c5e7e..1382feada6d 100644 --- a/src/journal/journald-server.c +++ b/src/journal/journald-server.c @@ -853,7 +853,10 @@ static void write_to_journal(Server *s, uid_t uid, struct iovec *iovec, size_t n return; } - log_info_errno(r, "Failed to write entry (%zu items, %zu bytes), rotating before retrying: %m", n, IOVEC_TOTAL_SIZE(iovec, n)); + if (r == -E2BIG) + log_debug("Journal file %s is full, rotating to a new file", f->file->path); + else + log_info_errno(r, "Failed to write entry (%zu items, %zu bytes), rotating before retrying: %m", n, IOVEC_TOTAL_SIZE(iovec, n)); server_rotate(s); server_vacuum(s, false);