diff --git a/lib/fluent/plugin/base.rb b/lib/fluent/plugin/base.rb index 64ec5d0967..601e216b81 100644 --- a/lib/fluent/plugin/base.rb +++ b/lib/fluent/plugin/base.rb @@ -72,8 +72,8 @@ def multi_workers_ready? def string_safe_encoding(str) unless str.valid_encoding? - log.info "invalid byte sequence is replaced in `#{str}`" if self.respond_to?(:log) str = str.scrub('?') + log.info "invalid byte sequence is replaced in `#{str}`" if self.respond_to?(:log) end yield str end