mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-18 14:30:41 +01:00
Handle journal invalidate
The journal API will sometimes issue an SD_JOURNAL_INVALIDATE
which results in a repositioning of the cursor. From the man page:
Programs only interested in a strictly sequential stream
of log data may treat SD_JOURNAL_INVALIDATE the same way as
SD_JOURNAL_APPEND, thus ignoring any changes to the log view
earlier than the old end of the log stream.
If we have configured IgnorePreviousMessages, we want to treat the
invalidate event as an append, and wind to the end of the message
stream.
This commit is contained in:
parent
6410e67b52
commit
e5eb85129f
@ -619,6 +619,10 @@ handleRotation(void)
|
||||
else if (cs.stateFile) {
|
||||
iRet = loadJournalState();
|
||||
}
|
||||
else if (cs.bIgnorePrevious) {
|
||||
/* Seek to the very end of the journal and ignore all older messages. */
|
||||
skipOldMessages();
|
||||
}
|
||||
journalContext.reloaded = 1;
|
||||
|
||||
finalize_it:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user