-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in_systemd: Move one record back after skipping to the end #8917
Conversation
@ardavast thanks for this contribution, would you please sign off the commits ? (DCO error) |
Signed-off-by: Ardavast Dayleryan <[email protected]>
d1b04dc
to
6cec44d
Compare
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the manual this seems to be correct :
Note that these calls do not actually make any entry the new current entry, this needs to be done in a separate step with a subsequent [sd_journal_next(3)](https://manpages.debian.org/testing/libsystemd-dev/sd_journal_next.3.en.html) invocation (or a similar call).
I’m SO glad this got merged finally! This fix has existed since my PR #8396, but I was getting radio silence :( thank you so much for finally getting this merged |
On recent versions of systemd,
read_from_tail()
doesn't work as expected unless followed with a call tosd_journal_previous()
.This can be tested with:
fluent-bit -i systemd -p read_from_tail=On -o stdout
The command works on:
But it doesn't work on:
The following short program can also be used to test this (uncomment the line that calls sd_journal_previous() to see the difference):