From 13774be3ce490f9c3be9ff594496b78bcfc928b3 Mon Sep 17 00:00:00 2001 From: Masahiro Nakagawa Date: Thu, 13 Jun 2019 13:57:08 +0900 Subject: [PATCH] parser_none: Use faster creation Signed-off-by: Masahiro Nakagawa --- lib/fluent/plugin/parser_none.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/fluent/plugin/parser_none.rb b/lib/fluent/plugin/parser_none.rb index 8d9bf60457..b3cbbd8647 100644 --- a/lib/fluent/plugin/parser_none.rb +++ b/lib/fluent/plugin/parser_none.rb @@ -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