diff options
author | Franck Bui <fbui@suse.com> | 2016-10-11 16:51:37 +0200 |
---|---|---|
committer | Franck Bui <fbui@suse.com> | 2016-10-19 09:53:07 +0200 |
commit | 18e758bf25d49ec7af589df9a2a4e6c905281a4e (patch) | |
tree | afcb96ccd23d4639cdebd7661d3fb16856b4535e /src/journal/journald.c | |
parent | cba5629e870bdab445a3b2ad42b140667c22eac1 (diff) |
journal: don't emit space usage message when opening the journal (#4190)
This patch makes system_journal_open() stop emitting the space usage
message. The caller is now free to emit this message when appropriate.
When restarting the journal, we can now emit the message *after*
flushing the journal (if required) so that all flushed log entries are
written in the persistent journal *before* the status message.
This is required since the status message is always younger than the
flushed entries.
Fixes #4190.
Diffstat (limited to 'src/journal/journald.c')
-rw-r--r-- | src/journal/journald.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c index 272acb71c4..13061f6469 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -60,6 +60,11 @@ int main(int argc, char *argv[]) { LOG_MESSAGE("Journal started"), NULL); + /* Make sure to send the usage message *after* flushing the + * journal so entries from the runtime journals are ordered + * before this message. See #4190 for some details. */ + server_space_usage_message(&server, NULL); + for (;;) { usec_t t = USEC_INFINITY, n; |