Skip to content

Commit

Permalink
use new event api in generator filter template
Browse files Browse the repository at this point in the history
Fixes #5355
  • Loading branch information
wiibaa authored and suyograo committed May 24, 2016
1 parent 9c4bac7 commit cd30aa9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LogStash::Filters::<%= classify(plugin_name) %> < LogStash::Filters::Base
if @message
# Replace the event message with our message as configured in the
# config file.
event["message"] = @message
event.set("message", @message)
end

# filter_matched should go in the last line of our successful code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe LogStash::Filters::<%= classify(plugin_name) %> do

sample("message" => "some text") do
expect(subject).to include("message")
expect(subject['message']).to eq('Hello World')
expect(subject.get('message')).to eq('Hello World')
end
end
end

0 comments on commit cd30aa9

Please sign in to comment.