Skip to content

Commit

Permalink
JSON parse rescue added
Browse files Browse the repository at this point in the history
  • Loading branch information
EldarAliiev authored Jun 19, 2019
1 parent d3759af commit 83d2196
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/logstash/outputs/coralogix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class LogStash::Outputs::Coralogix < LogStash::Outputs::Base
logger = get_logger(record)

log_record = log_key_name != nil ? record.fetch(log_key_name, record) : record
log_record = is_json ? log_record.to_json : log_record
log_record = (is_json ? log_record.to_json : log_record) rescue log_record
log_record = log_record.to_s.empty? ? record : log_record

timestamp = record.fetch(timestamp_key_name, nil)
Expand Down
4 changes: 2 additions & 2 deletions logstash-output-coralogix.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|
s.name = 'logstash-output-coralogix'
s.version = '1.0.2'
s.date = '2019-05-22'
s.version = '1.0.3'
s.date = '2019-06-19'
s.licenses = ['Apache-2.0']
s.summary = 'Deliver the logs to Coralogix service.'
s.description = 'This gem is a Logstash output plugin to deliver the logs to Coralogix service.'
Expand Down

0 comments on commit 83d2196

Please sign in to comment.