From f00c98251b9b3ca3a6e8bf5a1ffbcb4fb0d38287 Mon Sep 17 00:00:00 2001 From: Peter F Date: Thu, 31 May 2018 17:01:37 +0200 Subject: [PATCH] Update out_lookup.rb Fluentd v1 fix --- lib/fluent/plugin/out_lookup.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/fluent/plugin/out_lookup.rb b/lib/fluent/plugin/out_lookup.rb index db4c461..39c3ab7 100755 --- a/lib/fluent/plugin/out_lookup.rb +++ b/lib/fluent/plugin/out_lookup.rb @@ -85,7 +85,7 @@ def emit(tag, es, chain) es.each { |time, record| t = tag.dup filter_record(t, time, record) - Engine.emit(t, time, record) + router.emit(t, time, record) } chain.next @@ -98,7 +98,7 @@ def assign_self(record, key, value) end def assign(record, key, value) - record[key] = process(value) || value + record[key] = lookup(value) || value end def return(record, key, value_nouse) @@ -106,7 +106,7 @@ def return(record, key, value_nouse) end def rename(record, key, value_nouse) - new_key = process(key) || return + new_key = lookup(key) || return field_value = record[key] record.delete(key) record[new_key] = field_value @@ -157,7 +157,7 @@ def dig_cb(record, path, value, alter, cb) return nil end - def process(value) + def lookup(value) return @lookup_table[value] end