diff --git a/fluent-plugin-systemd.gemspec b/fluent-plugin-systemd.gemspec index d6aa4de..1e1df81 100644 --- a/fluent-plugin-systemd.gemspec +++ b/fluent-plugin-systemd.gemspec @@ -24,5 +24,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '1.13.0' spec.add_runtime_dependency 'fluentd', ['>= 0.14.11', '< 2'] - spec.add_runtime_dependency 'systemd-journal', '~> 2.0.0' + spec.add_runtime_dependency 'systemd-journal', '~> 2.1.0' end diff --git a/lib/fluent/plugin/in_systemd.rb b/lib/fluent/plugin/in_systemd.rb index adb8b3f..dcabfa0 100644 --- a/lib/fluent/plugin/in_systemd.rb +++ b/lib/fluent/plugin/in_systemd.rb @@ -75,7 +75,7 @@ def shutdown def init_journal # TODO: ruby 2.3 @journal.close if @journal # rubocop:disable Style/SafeNavigation - @journal = Systemd::Journal.new(path: @path) + @journal = Systemd::Journal.new(path: @path, auto_reopen: true) @journal.filter(*(@matches || @filters)) seek true