lib/fluent/plugin/in_systemd.rb in fluent-plugin-systemd-0.0.8 vs lib/fluent/plugin/in_systemd.rb in fluent-plugin-systemd-0.0.9

- old
+ new

@@ -83,10 +83,15 @@ def watch while @running init_journal if @journal.wait(0) == :invalidate while @journal.move_next && @running - yield @journal.current_entry + begin + yield @journal.current_entry + rescue Systemd::JournalError => e + log.warn("Error Parsing Journal: #{e.class}: #{e.message}") + next + end @pos_writer.update(@journal.cursor) end # prevent a loop of death sleep 1 end