Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiline ruby code #59

Open
vimalk78 opened this issue May 21, 2021 · 1 comment
Open

Support multiline ruby code #59

vimalk78 opened this issue May 21, 2021 · 1 comment

Comments

@vimalk78
Copy link

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               ^"
@vimalk78
Copy link
Author

Hi @repeatedly , any comments?
If y ou guide me, i can also send a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant