On 13 October 2014 07:22, Sascha Kattelmann <skattelm...@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
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel