lib/logging/layouts/parseable.rb in logging-2.2.0 vs lib/logging/layouts/parseable.rb in logging-2.2.1

- old
+ new

@@ -219,10 +219,11 @@ def format_obj( obj ) case obj when Exception h = { :class => obj.class.name, :message => obj.message } - h[:backtrace] = obj.backtrace if @backtrace && !obj.backtrace.nil? + h[:backtrace] = obj.backtrace if backtrace? && !obj.backtrace.nil? + h[:cause] = format_obj(obj.cause) if defined?(obj.cause) && !obj.cause.nil? h when Time iso8601_format(obj) else obj