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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ff69adefccb2944f6aa7cefc4f4a406ae4ffdd2
|
4
|
+
data.tar.gz: 33637bf25e4f581d5071de54f4210dd7964d32a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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.
|
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-
|
11
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core
|