def format_obj( obj )
      case obj
      when Exception
        hash = {
          :class   => obj.class.name,
          :message => obj.message
        }
        hash[:backtrace] = obj.backtrace if backtrace? && obj.backtrace

        cause = format_cause(obj)
        hash[:cause] = cause unless cause.empty?
        hash
      when Time
        iso8601_format(obj)
      else
        obj
      end
    end
def format_obj( obj )
      case obj
      when Exception
        hash = {
          :class   => obj.class.name,
          :message => obj.message
        }
        hash[:backtrace] = obj.backtrace if backtrace? && obj.backtrace

        cause = format_cause(obj)
        hash[:cause] = cause unless cause.empty?
        hash
      when Time
        iso8601_format(obj)
      else
        obj
      end
    end
Public: Take a given object and convert it into a format suitable for
 inclusion as a log message. The conversion allows the object to be more
 easily expressed in YAML or JSON form.

 If the object is an Exception, then this method will return a Hash
 containing the exception class name, message, and backtrace (if any).

 obj - The Object to format

 Returns the formatted Object.