lib/logging/layout.rb in logging-0.3.1 vs lib/logging/layout.rb in logging-0.4.0
- old
+ new
@@ -1,6 +1,6 @@
-# $Id: layout.rb 17 2007-01-20 18:47:43Z tim_pease $
+# $Id: layout.rb 33 2007-02-28 18:29:09Z tim_pease $
require 'yaml'
require 'logging'
module Logging
@@ -86,9 +86,10 @@
str = "<#{obj.class.name}> #{obj.message}"
unless obj.backtrace.nil?
str << "\n\t" << obj.backtrace.join("\n\t")
end
str
+ when nil: "<#{obj.class.name}> nil"
else
str = "<#{obj.class.name}> "
str << case @obj_format
when :inspect: obj.inspect
when :yaml: "\n#{obj.to_yaml}"