logstash-output-exec 3.0.3 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/outputs/exec.rb +2 -2
- data/logstash-output-exec.gemspec +1 -1
- data/spec/outputs/exec_spec.rb +3 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29fcfb399581aa75e8e3d73001763a92bf6f457a
|
4
|
+
data.tar.gz: b9d8df492e0c01c14e8199b378938e052585b75f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad0d473dcd805260cfdf029bcb22284f112eb9674db15ce970614f0ab4379d9fdb7dbb3f9c2ad40023efe6df5794e29e905d8c52ebd0ece32fb58c765e40d275
|
7
|
+
data.tar.gz: fddac5679e43d4dc3fffa405f30237c2a2a34e7267209d0ca9abf1a139f874dffa2dca0a76e135b9292a71f8ffc457ad678d5d106d66e102aeef0587990c46f7
|
data/CHANGELOG.md
CHANGED
@@ -50,12 +50,12 @@ class LogStash::Outputs::Exec < LogStash::Outputs::Base
|
|
50
50
|
|
51
51
|
Open3.popen3(cmd) do |stdin, stdout, stderr|
|
52
52
|
if @logger.debug?
|
53
|
-
@logger.
|
53
|
+
@logger.debug("debugging command", :stdout => stdout.read.chomp, :stderr => stderr.read.chomp)
|
54
54
|
else
|
55
55
|
# This is for backward compatibility,
|
56
56
|
# the previous implementation was using `Kernel#system' and the default behavior
|
57
57
|
# of this method is to output the result to the terminal.
|
58
|
-
@logger.
|
58
|
+
@logger.info(stdout.read.chomp) unless quiet?
|
59
59
|
end
|
60
60
|
end
|
61
61
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-exec'
|
3
|
-
s.version = '3.0
|
3
|
+
s.version = '3.1.0'
|
4
4
|
s.licenses = ['Apache License (2.0)']
|
5
5
|
s.summary = "This output will run a command for any matching event."
|
6
6
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
data/spec/outputs/exec_spec.rb
CHANGED
@@ -32,7 +32,8 @@ describe LogStash::Outputs::Exec do
|
|
32
32
|
end
|
33
33
|
|
34
34
|
it "register the stdout and stderr to the logger" do
|
35
|
-
expect(subject.logger).to receive(:
|
35
|
+
expect(subject.logger).to receive(:debug).with(/running exec command/, hash_including(:command))
|
36
|
+
expect(subject.logger).to receive(:debug).with(/debugging/, hash_including(:stdout, :stderr))
|
36
37
|
subject.receive(event)
|
37
38
|
end
|
38
39
|
end
|
@@ -40,7 +41,7 @@ describe LogStash::Outputs::Exec do
|
|
40
41
|
context "When debugging is off" do
|
41
42
|
context "when quiet is off" do
|
42
43
|
it "write output to the terminal" do
|
43
|
-
expect(subject.logger).to receive(:
|
44
|
+
expect(subject.logger).to receive(:info).with(output)
|
44
45
|
subject.receive(event)
|
45
46
|
end
|
46
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-exec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
97
|
rubyforge_project:
|
98
|
-
rubygems_version: 2.
|
98
|
+
rubygems_version: 2.4.8
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: This output will run a command for any matching event.
|