public
Created

  • Download Gist
aws_sdk_log_formatter.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
module AWS
module Core
class LogFormatter
# @param [Object] value
# @return [String]
def summarize_value value
case value
when String then summarize_string(value)
when Hash then '{' + summarize_hash(value) + '}'
when Array then summarize_array(value)
when File then summarize_file(value.path)
when Pathname then summarize_file(value)
else value.to_s.force_encoding('UTF-8').inspect
end
end
end
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.