logstash icon indicating copy to clipboard operation
logstash copied to clipboard

1.5.0 RC3 Ruby filter fails with undefined variable 'event'

Open ecweaver opened this issue 11 years ago • 3 comments

This ruby filter we've been running fine in 1.4.2...

filter { ruby { code => "begin; if !event['message'].nil?; event['message'] = event['message'].force_encoding('ASCII-8BIT').encode('UTF-8', :invalid => :replace, :undef => :replace, :replace => '?'); end; rescue; end;" } }

Now fails on 1.5.0 RC3 with: "undefined local variable or method `event'."

Is this a regression, or has something else changed?

ecweaver avatar Apr 27 '15 15:04 ecweaver

@ecweaver it is indeed a regression, it is being addressed in #3110 (issue #3100 )

jsvd avatar Apr 27 '15 15:04 jsvd

Thank you for the instant response! I guess we can close this as a dupe. Awaiting those issues.

Thanks again.

ecweaver avatar Apr 27 '15 15:04 ecweaver

Same as #3100

suyograo avatar Apr 27 '15 15:04 suyograo