<div dir="ltr"> On 13 October 2014 07:22, Sascha Kattelmann <span dir="ltr"><<a href="mailto:skattelmann@tpip.net" target="_blank">skattelmann@tpip.net</a>></span> wrote:<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
here is a related "bug" report: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=64614" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=64614</a></blockquote><div><br></div><div>sd_journal_next() is documented as returning '0' if there are no more entries available after the current position.</div><div>So this sounds like a bug to me.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Doing a "next" after "seek_tail" ends up in some unexpected behaviour. Just do a "previous" after seeking the tail and everything works fine.<br>
The problem is symmetrical: Same goes for "previous" after "seek_head". You need to do a "next" immediately after "seek_head".<br></blockquote><div><br></div><div>If this is the API contract; why not perform "next's" functionality inside of seek_head?</div><div><br></div><div><br></div><div>Thanks for the work around.</div><div>I just commited an example script: <a href="https://github.com/daurnimator/lua-systemd/blob/master/examples/tail_logs.lua">https://github.com/daurnimator/lua-systemd/blob/master/examples/tail_logs.lua</a></div><div><br></div></div></div></div>