logstash-codec-google_appengine 1.13.0 → 1.14.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bced434c6dd8fa72f09587399591caa6410bb32f
4
- data.tar.gz: 3c69cffb8da8d1bf67f29000f6d55129e6f7d536
3
+ metadata.gz: 0ff69adefccb2944f6aa7cefc4f4a406ae4ffdd2
4
+ data.tar.gz: 33637bf25e4f581d5071de54f4210dd7964d32a5
5
5
  SHA512:
6
- metadata.gz: ff2faec1f708198fe8be4753684bb64192a1455631ab0dc6e6d0bae2b9fc659653b565ee307705d7c31111ded653d0521cdd685c67f1de5f0436f5fb7485e53a
7
- data.tar.gz: 29e0937b45fda72006c8aa6485acb467326e0475a3205bbe44954d87d25d8ce88ddd5dca7dc3acebda692c7e1d844812d74a722fdace818d9d9f0d9242042e2a
6
+ metadata.gz: 2f82a9a3a85cb32e6cf201b7f94e9135b2f02bf4f0effee5298bf5c44a5151418d35e75fb1c8b19c81c2d93ea449ef06523afaf094a778bd7754b20f4a739b25
7
+ data.tar.gz: 6b873c9ad57d04579706356a56d59e0871b1c41b8b224820d2c428f7f804f02164b8a6b79263d18b3239eec4b6363a030fda7b0bc55a26e3936b875f4062e72a
@@ -17,7 +17,7 @@ class LogStash::Codecs::GoogleAppengine < LogStash::Codecs::Base
17
17
  begin
18
18
  data = LogStash::Json.load(data)
19
19
  flatten(data).each { |flattenedJson|
20
- yield LogStash::Event.new flattenedJson
20
+ yield(LogStash::Event.new(flattenedJson))
21
21
  }
22
22
  rescue => e
23
23
  @logger.error "Failed to process data", :error => e, :data => data
@@ -33,13 +33,9 @@ end
33
33
 
34
34
  def flatten(event)
35
35
  payload = event['protoPayload']
36
- lines = payload['line']
37
-
38
36
  payload.delete '@type'
39
-
40
-
37
+ lines = payload.delete 'line'
41
38
  if lines
42
- payload.delete 'line'
43
39
  lines.map.with_index { |line, i|
44
40
  merged = payload.merge line
45
41
  merged['_id'] = @md5.hexdigest merged['requestId'] + i.to_s
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-codec-google_appengine'
4
- s.version = '1.13.0'
4
+ s.version = '1.14.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "This codec may be used to decode via inputs appengine logs"
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"
@@ -34,11 +34,14 @@ context "#decode" do
34
34
 
35
35
  expect(collector[0]["message"]).to eq("IdentityFilter logUserIdentity: [[meta]] <anonymous:true>\n")
36
36
  expect(collector[0]["_id"]).to eq(md5.hexdigest collector[0]["requestId"] + "0")
37
+ expect(collector[0]["time"]).to eq("2015-09-03T10:59:40.589Z")
38
+
37
39
  expect(collector[0]["@type"]).to be_nil
38
40
 
39
41
  expect(collector[1]["message"]).to eq("HttpOnlyFilter getSession: add additional Set-Cookie with httpOnly-flag for JSESSIONID\n")
40
42
  expect(collector[1]["_id"]).to eq(md5.hexdigest collector[1]["requestId"] + "1")
41
43
  expect(collector[1]["@type"]).to be_nil
44
+ expect(collector[1]["time"]).to eq("2015-09-03T10:59:40.65Z")
42
45
  end
43
46
 
44
47
  it "should handle logs even when they have no lines" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-codec-google_appengine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Small Improvements
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-08 00:00:00.000000000 Z
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-core