Skip to content

Commit c929387

Browse files
committed
Miss click
1 parent af0e52f commit c929387

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

lib/fluent/plugin/filter_record_modifier.rb

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,13 @@ def configure(conf)
5656
method(:set_encoding)
5757
end
5858

59-
(
60-
class << self;
61-
self;
62-
end).module_eval do
59+
(class << self; self; end).module_eval do
6360
define_method(:change_encoding, m)
6461
end
6562
end
6663

6764
@has_tag_parts = false
68-
conf.elements.select {|element| element.name == 'record'}.each do |element|
65+
conf.elements.select { |element| element.name == 'record' }.each do |element|
6966
element.each_pair do |k, v|
7067
check_config_placeholders(k, v)
7168
element.has_key?(k) # to suppress unread configuration warning
@@ -76,7 +73,7 @@ class << self;
7673

7774
@replace_keys = Array.new
7875
if @replace
79-
conf.elements.select {|element| element.name == 'replace'}.each do |element|
76+
conf.elements.select { |element| element.name == 'replace' }.each do |element|
8077
expr = if element['expression'][0] == "/" && element['expression'][-1] == "/"
8178
element['expression'][1..-2]
8279
else
@@ -103,12 +100,12 @@ class << self;
103100
def filter(tag, time, record)
104101
tag_parts = @has_tag_parts ? tag.split('.') : nil
105102

106-
@map.each_pair {|k, v|
103+
@map.each_pair { |k, v|
107104
record[k] = v.expand(tag, time, record, tag_parts)
108105
}
109106

110107
if @remove_keys
111-
@remove_keys.each {|v|
108+
@remove_keys.each { |v|
112109
record.delete(v)
113110
}
114111
elsif @whitelist_keys
@@ -126,7 +123,7 @@ def filter(tag, time, record)
126123
end
127124

128125
record = change_encoding(record) if @char_encoding
129-
recordk
126+
record
130127
end
131128

132129
private

0 commit comments

Comments
 (0)