Skip to content

Commit dbd7359

Browse files
authored
Merge pull request #43 from reevoo/close-journal-on-rotate
Close Journal explictly on rotate
2 parents f30e587 + 785a804 commit dbd7359

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

fluent-plugin-systemd.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ Gem::Specification.new do |spec|
2525
spec.add_development_dependency "reevoocop"
2626

2727
spec.add_runtime_dependency "fluentd", [">= 0.14.11", "< 2"]
28-
spec.add_runtime_dependency "systemd-journal", "~> 1.2"
28+
spec.add_runtime_dependency "systemd-journal", "~> 1.3"
2929
end

lib/fluent/plugin/in_systemd.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ def shutdown
6161
private
6262

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

0 commit comments

Comments
 (0)