logstash-output-coralogix_logger 0.5.0 → 0.6.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: 19eb936043ac8e8b02348b2f17ec0cfe0aa32cfb
4
- data.tar.gz: 5c9708a5bd5d47b0765e80aa30c7c19f0fdf4de3
3
+ metadata.gz: 40684170b5a45fa2cf24abb3c4bb73a0b09f869d
4
+ data.tar.gz: 788b3e3c62aa33c794e62ac48ed82a4e593f26e8
5
5
  SHA512:
6
- metadata.gz: 5f78143e9609fd0b35030264d25823824600a5c8f6d6086635a95bb3e22b5d00fb517ea109a54385259578ca2a60c41e6cfdd1db7f07deb9c5e466b21b25c796
7
- data.tar.gz: b90ec215eb8487d83f59b5426c042b8c60dab5798cbbaf8cee0ab68a0f5af494d495d8153e12cdebb1870d0af826758ca63ee41d7d830ad68baf9c310c869e03
6
+ metadata.gz: 398c1430095dc4ee264bd33ffb1d06e3a0f81a1e3861b26602b8b5d78e6921f7033e0d82ce6b510741d2752ac2dd01e79a251090911f5c89b736f2f0b58ed21f
7
+ data.tar.gz: c49830c484b9dc760975af328e14a442ca804d3a96a96a198dacfa73f9ce812e551ac4481fc0b03c4ce420b33f255571454044771ff5d8d849be231722c906d2
@@ -2,6 +2,7 @@
2
2
  require "logstash/outputs/base"
3
3
  require "logstash/namespace"
4
4
  require 'centralized_ruby_logger'
5
+ require 'json'
5
6
 
6
7
  DEFAULT_APP_NAME = "FAILED_APP_NAME"
7
8
  DEFAULT_SUB_SYSTEM = "FAILED_SUB_SYSTEM_NAME"
@@ -23,12 +24,14 @@ class LogStash::Outputs::CoralogixLogger < LogStash::Outputs::Base
23
24
  def multi_receive(events)
24
25
  events.each do |record|
25
26
  record = record.to_hash["message"]
26
- logger = get_logger(record)
27
-
28
- log_record = log_key_name != nil ? record.fetch(log_key_name, record) : record
29
- log_record = is_json ? log_record.to_json : log_record
27
+ if is_json
28
+ p = JSON::Parser.new(record, {:create_additions => true})
29
+ log_record = p.parse
30
+ end
31
+ logger = get_logger(log_record)
32
+ log_record = log_key_name != nil ? log_record.fetch(log_key_name, log_record) : log_record
33
+ log_record = is_json ? log_record.to_json : log_record
30
34
  log_record = log_record.to_s.empty? ? record : log_record
31
- #puts log_record
32
35
  logger.debug log_record
33
36
  end
34
37
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-coralogix_logger'
3
- s.version = '0.5.0'
3
+ s.version = '0.6.0'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = 'Coralogix Logstash logger SDK'
6
6
  s.description = 'Coralogix Logstash logger to send logs to Coralogix server'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-coralogix_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Royee Goldberg