Skip to content

Commit

Permalink
Merge pull request #2455 from fluent/parser-none-small-opt
Browse files Browse the repository at this point in the history
parser_none: Use faster record creation
  • Loading branch information
repeatedly authored Jun 13, 2019
2 parents 12ffa0a + 13774be commit 0cfb8ad
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/fluent/plugin/parser_none.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ class NoneParser < Parser
config_param :message_key, :string, default: 'message'

def parse(text)
record = {}
record[@message_key] = text
record = {@message_key => text}
time = @estimate_current_event ? Fluent::EventTime.now : nil
yield time, record
end
Expand Down

0 comments on commit 0cfb8ad

Please sign in to comment.