You are using single-quotes to quote a string that contains both single-quotes and double-quotes. You could insert 4 spaces before that line to preserve the quoting. But it would be easier to put the filters in a file and use -f.
Settings: Default pipeline workers: 4
SyntaxError: (ruby filter code):1: unknown type of %string @codeblock = lambda { |event| event.set(newfield, event.get(crea).strftime(%Y-%m).to_i) }
^
eval at org/jruby/RubyKernel.java:1079
register at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-ruby-2.0.5/lib/logstash/filters/ruby.rb:29
start_workers at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:182
each at org/jruby/RubyArray.java:1613
start_workers at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:182
run at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:136
start_pipeline at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/agent.rb
I'm not undertand your feedback with the use of single-quote
Could you help for comprehension ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.