From: Daan De Meyer Date: Wed, 5 Jan 2022 10:46:39 +0000 (+0000) Subject: journal: Log filename when we fail to write an entry X-Git-Tag: v251-rc1~588^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F22012%2Fhead;p=thirdparty%2Fsystemd.git journal: Log filename when we fail to write an entry --- diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index 1382feada6d..9bfe22906a5 100644 --- a/src/journal/journald-server.c +++ b/src/journal/journald-server.c @@ -856,7 +856,7 @@ static void write_to_journal(Server *s, uid_t uid, struct iovec *iovec, size_t 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)); + log_info_errno(r, "Failed to write entry to %s (%zu items, %zu bytes), rotating before retrying: %m", f->file->path, n, IOVEC_TOTAL_SIZE(iovec, n)); server_rotate(s); server_vacuum(s, false); @@ -868,7 +868,7 @@ static void write_to_journal(Server *s, uid_t uid, struct iovec *iovec, size_t n log_debug("Retrying write."); r = journal_file_append_entry(f->file, &ts, NULL, iovec, n, &s->seqnum, NULL, NULL); if (r < 0) - log_error_errno(r, "Failed to write entry (%zu items, %zu bytes) despite vacuuming, ignoring: %m", n, IOVEC_TOTAL_SIZE(iovec, n)); + log_error_errno(r, "Failed to write entry to %s (%zu items, %zu bytes) despite vacuuming, ignoring: %m", f->file->path, n, IOVEC_TOTAL_SIZE(iovec, n)); else server_schedule_sync(s, priority); }