[systemd-devel] odd seek_tail behaviour
Daurnimator
quae at daurnimator.com
Mon Oct 13 10:23:13 PDT 2014
On 13 October 2014 07:22, Sascha Kattelmann <skattelmann at tpip.net> wrote:
> here is a related "bug" report:
> https://bugs.freedesktop.org/show_bug.cgi?id=64614
sd_journal_next() is documented as returning '0' if there are no more
entries available after the current position.
So this sounds like a bug to me.
> Doing a "next" after "seek_tail" ends up in some unexpected behaviour.
> Just do a "previous" after seeking the tail and everything works fine.
> The problem is symmetrical: Same goes for "previous" after "seek_head".
> You need to do a "next" immediately after "seek_head".
>
If this is the API contract; why not perform "next's" functionality inside
of seek_head?
Thanks for the work around.
I just commited an example script:
https://github.com/daurnimator/lua-systemd/blob/master/examples/tail_logs.lua
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141013/5f89f729/attachment.html>
More information about the systemd-devel
mailing list