Skip to content

Commit

Permalink
replace bad characters before logging them out
Browse files Browse the repository at this point in the history
Signed-off-by: Maksym Lisogorskyi <[email protected]>
  • Loading branch information
timberhill committed Jan 10, 2022
1 parent d1f33da commit 6a13ba3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fluent/plugin/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6a13ba3

Please sign in to comment.