mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
adjust syntax to be 1.9 friendly
This commit is contained in:
parent
f82c04fdee
commit
19d1ab28b0
1 changed files with 3 additions and 3 deletions
|
@ -74,9 +74,9 @@ class LogStash::Inputs::Base < LogStash::Plugin
|
|||
event.source = source
|
||||
|
||||
case @format.first
|
||||
when "plain":
|
||||
when "plain"
|
||||
event.message = raw
|
||||
when "json":
|
||||
when "json"
|
||||
begin
|
||||
fields = JSON.parse(raw)
|
||||
fields.each { |k, v| event[k] = v }
|
||||
|
@ -94,7 +94,7 @@ class LogStash::Inputs::Base < LogStash::Plugin
|
|||
else
|
||||
event.message = raw
|
||||
end
|
||||
when "json_event":
|
||||
when "json_event"
|
||||
begin
|
||||
event = LogStash::Event.from_json(raw)
|
||||
rescue => e
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue