logstash-output-exec 3.0.3 → 3.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c930f0ef4b9f3dc5699986d298baf31311b94bd
4
- data.tar.gz: 4de063aa33f5c8792d43ff4aebfb30bc2d720ebb
3
+ metadata.gz: 29fcfb399581aa75e8e3d73001763a92bf6f457a
4
+ data.tar.gz: b9d8df492e0c01c14e8199b378938e052585b75f
5
5
  SHA512:
6
- metadata.gz: 86e0f5a0079c9b35c6ed7518fa4fea3e765b31677750899ffaa56fa2275a01eedb16b6935b2244aac0a7321d6b11220dc4e765368183b35a3a0345a1e3f8a75e
7
- data.tar.gz: 5a9ba465c9ec43efabba1c09ea9d7cb4051c38c379eb657bbe17835bfddbc545905f8250bb48aea40ae8ba5560d6f23aa6c38ac54cae0205c330ff0528bccc95
6
+ metadata.gz: ad0d473dcd805260cfdf029bcb22284f112eb9674db15ce970614f0ab4379d9fdb7dbb3f9c2ad40023efe6df5794e29e905d8c52ebd0ece32fb58c765e40d275
7
+ data.tar.gz: fddac5679e43d4dc3fffa405f30237c2a2a34e7267209d0ca9abf1a139f874dffa2dca0a76e135b9292a71f8ffc457ad678d5d106d66e102aeef0587990c46f7
@@ -1,3 +1,6 @@
1
+ ## 3.1.0
2
+ - Log output of the exec'd command using log4j info and debug
3
+
1
4
  ## 3.0.3
2
5
  - Relax constraint on logstash-core-plugin-api to >= 1.60 <= 2.99
3
6
 
@@ -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.pipe(stdout => :debug, stderr => :debug)
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.terminal(stdout.read.chomp) unless quiet?
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'
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"
@@ -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(:pipe).with(stdout => :debug, stderr => :debug)
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(:terminal).with(output)
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.3
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-07-14 00:00:00.000000000 Z
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.6.3
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.