# File lib/logging/layout.rb, line 31
  def initialize( opts = {} )
    ::Logging.init unless ::Logging.initialized?

    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, :json; 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