Created
June 9, 2012 18:07
-
-
Save rafaelp/2902006 to your computer and use it in GitHub Desktop.
Revisions
-
rafaelp created this gist
Jun 9, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,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