fluent-plugin-record-modifier
fluent-plugin-record-modifier copied to clipboard
Support multiline ruby code
Is it possible to support multiline code?
<filter **>
@type record_modifier
<record>
somekey ${if !record['field1'].nil?;
record['field1'];
elsif record['field2'] != "";
record['field2'];
else
record['somekey'];
end;}
</record>
</filter>
Currently i get error in fluentd (1.7.2)
2021-05-21 11:59:16 +0000 [error]: /usr/local/share/gems/gems/fluent-plugin-record-modifier-2.1.0/lib/fluent/plugin/filter_record_modifier.rb:175: unterminated string meets end of file
end
^
^ error_class=SyntaxError error="/usr/local/share/gems/gems/fluent-plugin-record-modifier-2.1.0/lib/fluent/plugin/filter_record_modifier.rb:175: unterminated string meets end of file\n end\n ^\n/usr/local/share/gems/gems/fluent-plugin-record-modifier-2.1.0/lib/fluent/plugin/filter_record_modifier.rb:175: syntax error, unexpected end-of-input, expecting keyword_end\n end\n ^"
Hi @repeatedly , any comments? If y ou guide me, i can also send a PR