Skip to content

Commit

Permalink
Implement missing fix for 2.0 compatibility
Browse files Browse the repository at this point in the history
Increase log-courier gem dependency for byte/length fix
Fixes driskell/log-courier#247
Fixes driskell/log-courier#200
1.9.0
  • Loading branch information
driskell committed Nov 10, 2015
1 parent 45888c8 commit 9898032
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PATH
remote: .
specs:
logstash-output-courier (1.8.4)
log-courier (= 1.8.3)
logstash-output-courier (1.8.4.pre.1.pre.g45888c8)
log-courier (~> 1.9)
logstash-core (>= 1.4, < 3)

GEM
Expand All @@ -24,13 +24,13 @@ GEM
filesize (0.0.4)
gems (0.8.3)
i18n (0.6.9)
jrjackson (0.3.6)
jrjackson (0.3.7)
jruby-openssl (0.9.12-java)
log-courier (1.8.3)
log-courier (1.9.0)
cabin (~> 0.6)
ffi-rzmq (~> 2.0)
multi_json (~> 1.10)
logstash-core (1.5.5-java)
logstash-core (2.0.0-java)
cabin (~> 0.7.0)
clamp (~> 0.6.5)
concurrent-ruby (~> 0.9.1)
Expand Down
17 changes: 12 additions & 5 deletions lib/logstash/outputs/courier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,21 @@ def register

def receive(event)
return unless output?(event)
if event == LogStash::SHUTDOWN
@client.shutdown
finished
return
end
@client.publish event.to_hash
end

# Logstash < 2.0.0 shutdown
def teardown
close
end

# Logstash >= 2.0.0 shutdown
def close
@client.shutdown
finished
nil
end

private

def options
Expand Down
2 changes: 1 addition & 1 deletion logstash-output-courier.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ Gem::Specification.new do |gem|
gem.metadata = { 'logstash_plugin' => 'true', 'logstash_group' => 'output' }

gem.add_runtime_dependency 'logstash-core', '>= 1.4', '< 3'
gem.add_runtime_dependency 'log-courier', '= 1.8.3'
gem.add_runtime_dependency 'log-courier', '~> 1.9'
end
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.4
1.9.0

0 comments on commit 9898032

Please sign in to comment.