logstash-codec-google_appengine 1.1.0 → 1.2.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: 4c728ea2fafe715079ed06e61bad3fc2e6e63987
4
- data.tar.gz: f1dda6b6e77e03a5f186ff288751b48d7005e557
3
+ metadata.gz: 9ea3583c470ffc16060fd747cd7356cf06409623
4
+ data.tar.gz: deb063973fa616655f86a96f02d5300f037dca15
5
5
  SHA512:
6
- metadata.gz: af0e9cd5baf6d2b5a6bd7cf6fd404359cf54c1bf3fa33b7477c76d88e70a94c84b7f9b82e29adaba1af239a8eb937c18a637d27e7a55bb7b749074834fccb7b6
7
- data.tar.gz: 407974819b0e81ccd7e0d8284eccfb466bdf6dc288a20dc13bcc0ea31b2c0de9d7920bff1b2676c52b4e1df4c179b913cdb55350af83474dbc51646f435c364b
6
+ metadata.gz: 23b6dadcb11cdb0e6114f5bde7f871e2893b4018f540e58f727c3bd8af852c27407cc9d11b115ca6b84d67e55a9de01bae0d2782762a45edc2d72b1f7a85e4c5
7
+ data.tar.gz: 3c5eb1ca67af2bd978d695b98cfd8d6ed33627f96ddde6387feec451eb5a47ca1db1a0a32809d04ca0d61905a03af998ff3e1e2506abd5ca8bebbb1e1f8e445f
@@ -13,17 +13,23 @@ class LogStash::Codecs::GoogleAppengine < LogStash::Codecs::Base
13
13
  end
14
14
 
15
15
  def decode(data)
16
- @json.decode(data) do |json|
17
- if is_parse_failure(json)
18
- return yield json
16
+ begin
17
+ @json.decode(data) do |json|
18
+ if is_parse_failure(json)
19
+ return yield json
20
+ end
21
+ flatten(json).each { |flattenedJson|
22
+ yield LogStash::Event.new(flattenedJson)
23
+ }
19
24
  end
20
- flatten(json).each { |flattenedJson|
21
- yield LogStash::Event.new(flattenedJson)
22
- }
25
+ rescue => e
26
+ @logger.info("Failed to process data", :error => e, :data => data)
27
+ yield LogStash::Event.new("message" => data, "tags" => ["_googleappengineparsefailure"])
23
28
  end
24
29
  end
25
30
  end
26
31
 
32
+
27
33
  private
28
34
 
29
35
  def is_parse_failure(event)
@@ -1,21 +1,9 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <module type="RUBY_MODULE" version="4">
3
- <component name="FacetManager">
4
- <facet type="gem" name="Ruby Gem">
5
- <configuration>
6
- <option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
7
- <option name="GEM_APP_TEST_PATH" value="$MODULE_DIR$/test" />
8
- <option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
9
- </configuration>
10
- </facet>
11
- </component>
12
3
  <component name="NewModuleRootManager" inherit-compiler-output="true">
13
4
  <exclude-output />
14
- <content url="file://$MODULE_DIR$">
15
- <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
16
- <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
17
- </content>
18
- <orderEntry type="jdk" jdkName="jruby-9.0.1.0-p0" jdkType="JRUBY_SDK" />
5
+ <content url="file://$MODULE_DIR$" />
6
+ <orderEntry type="inheritedJdk" />
19
7
  <orderEntry type="sourceFolder" forTests="false" />
20
8
  <orderEntry type="library" scope="PROVIDED" name="bundler (v1.10.6, jruby-9.0.1.0-p0) [gem]" level="application" />
21
9
  <orderEntry type="library" scope="PROVIDED" name="cabin (v0.7.1, jruby-9.0.1.0-p0) [gem]" level="application" />
@@ -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.1.0'
4
+ s.version = '1.2.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"
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.1.0
4
+ version: 1.2.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-03 00:00:00.000000000 Z
11
+ date: 2015-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-core