logstash-cli 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/logstash-cli/command/tail.rb +6 -5
- data/lib/logstash-cli/version.rb +1 -1
- metadata +4 -4
@@ -26,12 +26,14 @@ module Tail
|
|
26
26
|
:user => amqp_user, :password => amqp_password ,
|
27
27
|
:ssl => amqp_ssl }
|
28
28
|
|
29
|
-
#
|
29
|
+
# Amqp url can override settings
|
30
30
|
unless amqp_url.nil?
|
31
|
-
settings =
|
31
|
+
settings = amqp_url
|
32
32
|
end
|
33
33
|
|
34
34
|
AMQP.start(settings) do |connection, open_ok|
|
35
|
+
trap("INT") { puts "Shutting down..."; connection.close { EM.stop }; exit }
|
36
|
+
|
35
37
|
channel = AMQP::Channel.new(connection, :auto_recovery => true)
|
36
38
|
|
37
39
|
channel.queue("", :auto_delete => auto_delete, :peristent => persistent , :durable => durable) do |queue, declare_ok|
|
@@ -52,10 +54,9 @@ module Tail
|
|
52
54
|
rescue AMQP::PossibleAuthenticationFailureError => ex
|
53
55
|
puts "Possible Authentication error:\nthe AMQP connection URL used is #{amqp_url}\n\nDetail Info:\n#{ex}"
|
54
56
|
exit -1
|
55
|
-
rescue
|
56
|
-
puts "Error
|
57
|
+
rescue StandardError => ex
|
58
|
+
puts "Error occurred: #{ex}"
|
57
59
|
exit -1
|
58
60
|
end
|
59
|
-
trap("INT") { puts "Shutting down..."; connection.close { EM.stop };exit }
|
60
61
|
end
|
61
62
|
end
|
data/lib/logstash-cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Patrick Debois
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-08-
|
18
|
+
date: 2012-08-21 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
requirement: &id001 !ruby/object:Gem::Requirement
|