lib/fluent/plugin/out_string_scrub.rb in fluent-plugin-string-scrub-0.0.2 vs lib/fluent/plugin/out_string_scrub.rb in fluent-plugin-string-scrub-0.0.3

- old
+ new

@@ -25,12 +25,11 @@ @removed_length = @removed_prefix_string.length end if @add_prefix @added_prefix_string = @add_prefix + '.' end - - if @replace_char and @replace_char.length >= 2 - raise Fluent::ConfigError, "replace_char: mast be 1 character" + if @replace_char =~ /\\u\{*[A-F0-9]{4}\}*/ + @replace_char = eval("\"#{@replace_char}\"") end end def emit(tag, es, chain) tag = if @tag