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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40684170b5a45fa2cf24abb3c4bb73a0b09f869d
|
4
|
+
data.tar.gz: 788b3e3c62aa33c794e62ac48ed82a4e593f26e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
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.
|
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'
|