From 215da19bdab1440474baff72b71b0f398cdf7166 Mon Sep 17 00:00:00 2001 From: Kenji Okimoto Date: Fri, 15 Jun 2018 16:32:01 +0900 Subject: [PATCH] Remove parse_type like attributes from owner plugin configuration Signed-off-by: Kenji Okimoto --- app/models/concerns/fluentd/setting/plugin_config.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/concerns/fluentd/setting/plugin_config.rb b/app/models/concerns/fluentd/setting/plugin_config.rb index 59ffadd..453a4a3 100644 --- a/app/models/concerns/fluentd/setting/plugin_config.rb +++ b/app/models/concerns/fluentd/setting/plugin_config.rb @@ -20,7 +20,10 @@ class Fluentd when "storage" "storage" end - _attributes = { "@type" => self.plugin_name }.merge(attributes) + _attributes = attributes.reject do |key, value| + %w(parse_type format_type buffer_type storage_type).include?(key.to_s) + end + _attributes = { "@type" => self.plugin_name }.merge(_attributes) _attributes["@log_level"] = _attributes.delete("log_level") argument = case plugin_type when "output", "filter", "buffer"