Skip to content

Commit

Permalink
Merge pull request #43 from reevoo/close-journal-on-rotate
Browse files Browse the repository at this point in the history
Close Journal explictly on rotate
  • Loading branch information
errm authored Oct 3, 2017
2 parents f30e587 + 785a804 commit dbd7359
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fluent-plugin-systemd.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "reevoocop"

spec.add_runtime_dependency "fluentd", [">= 0.14.11", "< 2"]
spec.add_runtime_dependency "systemd-journal", "~> 1.2"
spec.add_runtime_dependency "systemd-journal", "~> 1.3"
end
2 changes: 2 additions & 0 deletions lib/fluent/plugin/in_systemd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ def shutdown
private

def init_journal
# TODO: ruby 2.3
@journal.close if @journal # rubocop:disable Style/SafeNavigation
@journal = Systemd::Journal.new(path: @path)
# make sure initial call to wait doesn't return :invalidate
# see https://github.com/ledbettj/systemd-journal/issues/70
Expand Down

0 comments on commit dbd7359

Please sign in to comment.