Skip to content

Commit

Permalink
Fix bug #3
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroakis committed Dec 26, 2018
1 parent 9aca810 commit 844d699
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/fluent/plugin/filter_pan_anonymizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ def initialize
def configure(conf)
super

formats = conf.each_element.map do |i|
next if i["formats"].nil?
i["formats"].scan(/\/[^\/]*\//).map do |j| j.delete("/") end.map do |j| Regexp.new(j) end
end.flatten

@pan_masker = @pan_configs.map do |i|
i[:formats].map do |format|
formats.map do |format|
Fluent::PAN::Masker.new(format, i[:checksum_algorithm], i[:mask], i[:force])
end
end.flatten
Expand Down

0 comments on commit 844d699

Please sign in to comment.