lib/eco/data/files/helpers.rb in eco-helpers-3.0.4 vs lib/eco/data/files/helpers.rb in eco-helpers-3.0.5
- old
+ new
@@ -28,14 +28,18 @@
content.scrub do |bytes|
replacement = "<#{bytes.unpack1('H*')}>"
if tolerance <= 0
- logger.error("There were more than 5 encoding errors in the file '#{file}'.")
+ log(:error) {
+ "There were more than 5 encoding errors in the file '#{file}'."
+ }
return content
else
tolerance -= 1
- logger.error("Encoding problem in file '#{file}': '#{replacement}'.")
+ log(:error) {
+ "Encoding problem in file '#{file}': '#{replacement}'."
+ }
replacement
end
end
end
end