mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
Fixes LOGSTASH-782: Gelf output level option
Level option now works correctly: picks the first valid entry in the array.
This commit is contained in:
parent
a169739c7d
commit
21859c5944
1 changed files with 7 additions and 7 deletions
|
@ -162,11 +162,11 @@ class LogStash::Outputs::Gelf < LogStash::Outputs::Base
|
|||
if @level.is_a?(Array)
|
||||
@level.each do |value|
|
||||
parsed_value = event.sprintf(value)
|
||||
if parsed_value
|
||||
next if value.count('%{') > 0 and parsed_value == value
|
||||
|
||||
level = parsed_value
|
||||
break
|
||||
end
|
||||
end
|
||||
else
|
||||
level = event.sprintf(@level.to_s)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue