logstash-input-log4j 2.0.2-java → 2.0.3-java
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 +2 -0
- data/lib/logstash/inputs/log4j.rb +12 -3
- data/logstash-input-log4j.gemspec +1 -1
- data/spec/inputs/log4j_spec.rb +1 -1
- 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: 945e2806f2a50edaf4c8576103998d3bc2ba8372
|
4
|
+
data.tar.gz: 565249091a9afc20cc6a73dd13777b007e545bbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66fc5a0768a5c0bae0bf9c6253bc41c22578a6ed00f441f68c8376d79201fca31df51eb01e3c893af14dab8d170a3f139ea88ee83ff753a19aa11f527fd81888
|
7
|
+
data.tar.gz: 786307fcd028e1f68e7fc88cb3045ac1afaa2a8c87e5ae77874615c6d337e60129bd30b0a1f5581cc1533621685edcf5000b21fbbcde0af87037d319527359ce
|
data/CHANGELOG.md
CHANGED
@@ -153,7 +153,7 @@ class LogStash::Inputs::Log4j < LogStash::Inputs::Base
|
|
153
153
|
if server?
|
154
154
|
while !stop?
|
155
155
|
Thread.start(@server_socket.accept) do |s|
|
156
|
-
s
|
156
|
+
add_socket_mixin(s)
|
157
157
|
@logger.debug? && @logger.debug("Accepted connection", :client => s.peer,
|
158
158
|
:server => "#{@host}:#{@port}")
|
159
159
|
handle_socket(s, output_queue)
|
@@ -161,12 +161,21 @@ class LogStash::Inputs::Log4j < LogStash::Inputs::Base
|
|
161
161
|
end # loop
|
162
162
|
else
|
163
163
|
while !stop?
|
164
|
-
client_socket =
|
165
|
-
client_socket.instance_eval { class << self; include ::LogStash::Util::SocketPeer end }
|
164
|
+
client_socket = build_client_socket
|
166
165
|
@logger.debug? && @logger.debug("Opened connection", :client => "#{client_socket.peer}")
|
167
166
|
handle_socket(client_socket, output_queue)
|
168
167
|
end # loop
|
169
168
|
end
|
170
169
|
rescue IOError
|
171
170
|
end # def run
|
171
|
+
|
172
|
+
def build_client_socket
|
173
|
+
s = TCPSocket.new(@host, @port)
|
174
|
+
add_socket_mixin(s)
|
175
|
+
s
|
176
|
+
end
|
177
|
+
|
178
|
+
def add_socket_mixin(socket)
|
179
|
+
socket.instance_eval { class << self; include ::LogStash::Util::SocketPeer end }
|
180
|
+
end
|
172
181
|
end # class LogStash::Inputs::Log4j
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-log4j'
|
4
|
-
s.version = '2.0.
|
4
|
+
s.version = '2.0.3'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Read events over a TCP socket from a Log4j SocketAppender"
|
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"
|
data/spec/inputs/log4j_spec.rb
CHANGED
@@ -27,7 +27,7 @@ describe LogStash::Inputs::Log4j do
|
|
27
27
|
allow(socket).to receive(:peer).and_return("localhost")
|
28
28
|
allow(socket).to receive(:close).and_return(true)
|
29
29
|
allow(ois).to receive(:readObject).and_return({})
|
30
|
-
allow(
|
30
|
+
allow(subject).to receive(:build_client_socket).and_return(socket)
|
31
31
|
expect(subject).to receive(:socket_to_inputstream).with(socket).and_return(ois)
|
32
32
|
expect(subject).to receive(:create_event).and_return(LogStash::Event.new).at_least(:once)
|
33
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-log4j
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: java
|
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-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|