def initialize( opts = {} )
::Logging.init unless ::Logging.const_defined? :MAX_LEVEL_LENGTH
default = ::Logging.const_defined?('OBJ_FORMAT') ?
::Logging::OBJ_FORMAT : nil
f = opts.getopt(:format_as, default)
f = f.intern if f.instance_of? String
@obj_format = case f
when :inspect, :yaml; f
else :string end
b = opts.getopt(:backtrace, ::Logging.backtrace)
@backtrace = case b
when :on, 'on', true; true
when :off, 'off', false; false
else
raise ArgumentError, "backtrace must be true or false"
end
end