36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# File 'lib/fluent/plugin/out_record_modifier.rb', line 36
def configure(conf)
super
@map = {}
conf.each_pair { |k, v|
unless BUILTIN_CONFIGURATIONS.include?(k)
check_config_placeholders(k, v)
conf.has_key?(k)
@map[k] = v
end
}
if @char_encoding
from, to = @char_encoding.split(':', 2)
@from_enc = Encoding.find(from)
@to_enc = Encoding.find(to) if to
m = if @to_enc
method(:convert_encoding)
else
method(:set_encoding)
end
(class << self; self; end).module_eval do
define_method(:change_encoding, m)
end
end
if @remove_keys and @whitelist_keys
raise Fluent::ConfigError, "remove_keys and whitelist_keys are exclusive with each other."
elsif @remove_keys
@remove_keys = @remove_keys.split(',').map(&:strip)
elsif @whitelist_keys
@whitelist_keys = @whitelist_keys.split(',').map(&:strip)
end
end
|