lib/fluent/plugin/in_systemd.rb in fluent-plugin-systemd-0.1.1.pre vs lib/fluent/plugin/in_systemd.rb in fluent-plugin-systemd-0.1.1.pre2

- old
+ new

@@ -51,11 +51,15 @@ # and https://bugs.freedesktop.org/show_bug.cgi?id=64614, after doing a seek(:tail), # you must move back in such a way that the next move_next will return the last # record def seek_to(pos) @journal.seek(pos) - return unless pos == :tail - @journal.move(-2) + return if pos == :head + if pos == :tail + @journal.move(-2) + else + @journal.move(1) + end end def read_from @read_from_head ? :head : :tail end