Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
frankreno committed Jun 20, 2019
1 parent 02d73ac commit 95cd815
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/fluent/plugin/out_sumologic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,6 @@ def write(chunk)
key = sumo_key(sumo_metadata, chunk)
log_format = sumo_metadata['log_format'] || @log_format

if log_format.eql? 'fields'
log_fields = sumo_fields(sumo_metadata)
end

# Strip any unwanted newlines
record[@log_key].chomp! if record[@log_key] && record[@log_key].respond_to?(:chomp!)

Expand All @@ -256,8 +252,9 @@ def write(chunk)
end
log = dump_log(merge_json(record))
when 'fields'
log_fields = sumo_fields(sumo_metadata)
if @add_timestamp
record = { :timestamp => sumo_timestamp(time) }.merge(record)
record = { @timestamp_key => sumo_timestamp(time) }.merge(record)
end
log = dump_log(record)
else
Expand Down

0 comments on commit 95cd815

Please sign in to comment.