logstash-input-lumberjack 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -1
- data/lib/logstash/inputs/lumberjack.rb +14 -8
- data/logstash-input-lumberjack.gemspec +1 -1
- data/spec/inputs/lumberjack_spec.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6439998770b842a2295277eb852f74c538a33e8d
|
4
|
+
data.tar.gz: 7d7fb7d8bc8afdb4780c53b1322e41b5c667bf2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e58cf8471ba746773cdfe347781c587cb64e70ee468a7ba6f699f0aa872209409db18c8862f6a452e1cf7e2c912650d0bf358a989ab7c0c1abbfd7ab469c6f0
|
7
|
+
data.tar.gz: 291db828aa1a19663e38fad3b11db54ad842a685cad3a2f9fc5c5ff00adce5e72159f72c8364eae44224e8d9f2620c146874d090f487bc7002c18463cf65f099
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
## 2.0.
|
1
|
+
## 2.0.2
|
2
2
|
- Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
|
3
3
|
instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
|
4
|
+
|
5
|
+
## 2.0.0
|
4
6
|
- Dependency on logstash-core update to 2.0
|
5
7
|
|
6
8
|
# 1.0.5
|
@@ -68,12 +68,17 @@ class LogStash::Inputs::Lumberjack < LogStash::Inputs::Base
|
|
68
68
|
def run(output_queue)
|
69
69
|
start_buffer_broker(output_queue)
|
70
70
|
|
71
|
-
while
|
71
|
+
while !stop? do
|
72
72
|
# Wrappingu the accept call into a CircuitBreaker
|
73
73
|
if @circuit_breaker.closed?
|
74
|
-
connection = @lumberjack.accept #
|
75
|
-
|
74
|
+
connection = @lumberjack.accept # call that creates a new connection
|
75
|
+
next if connection.nil? # if the connection is nil the connection was close.
|
76
76
|
invoke(connection, @codec.clone) do |_codec, line, fields|
|
77
|
+
if stop?
|
78
|
+
connection.close
|
79
|
+
break
|
80
|
+
end
|
81
|
+
|
77
82
|
_codec.decode(line) do |event|
|
78
83
|
begin
|
79
84
|
decorate(event)
|
@@ -89,12 +94,13 @@ class LogStash::Inputs::Lumberjack < LogStash::Inputs::Base
|
|
89
94
|
sleep(RECONNECT_BACKOFF_SLEEP)
|
90
95
|
end
|
91
96
|
end
|
92
|
-
rescue LogStash::ShutdownSignal
|
93
|
-
@logger.info("Lumberjack input: received ShutdownSignal")
|
94
|
-
ensure
|
95
|
-
shutdown(output_queue)
|
96
97
|
end # def run
|
97
98
|
|
99
|
+
public
|
100
|
+
def stop
|
101
|
+
@lumberjack.close
|
102
|
+
end
|
103
|
+
|
98
104
|
private
|
99
105
|
def invoke(connection, codec, &block)
|
100
106
|
@threadpool.post do
|
@@ -121,7 +127,7 @@ class LogStash::Inputs::Lumberjack < LogStash::Inputs::Base
|
|
121
127
|
|
122
128
|
def start_buffer_broker(output_queue)
|
123
129
|
@threadpool.post do
|
124
|
-
while
|
130
|
+
while !stop?
|
125
131
|
output_queue << @buffered_queue.pop_no_timeout
|
126
132
|
end
|
127
133
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-lumberjack'
|
4
|
-
s.version = '2.0.
|
4
|
+
s.version = '2.0.2'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Receive events using the lumberjack protocol."
|
7
7
|
s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-lumberjack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|