Skip to content

Commit

Permalink
Merge pull request #77 from mariusgrigoriu/master
Browse files Browse the repository at this point in the history
rescue JournalError
  • Loading branch information
errm committed Apr 22, 2021
2 parents 66778ed + c445853 commit aa1a55d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/fluent/plugin/in_systemd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ def formatted(entry)

def watch(&block)
yield_current_entry(&block) while @journal.move_next
rescue Systemd::JournalError => e
log.warn("Error moving to next Journal entry: #{e.class}: #{e.message}")
end

def yield_current_entry
Expand Down

0 comments on commit aa1a55d

Please sign in to comment.