def logger
      l = ::Logger.new($stderr)

      case mode
      when :debug
        l.level = ::Logger::DEBUG
        format_debug(l)
      when :silent
        l.level = 9_999
      when :info
        l.level = ::Logger::INFO
        format_standard(l)
      else
        l.level = ::Logger::INFO
        format_standard(l)
      end

      l
    end
def logger
      l = ::Logger.new($stderr)

      case mode
      when :debug
        l.level = ::Logger::DEBUG
        format_debug(l)
      when :silent
        l.level = 9_999
      when :info
        l.level = ::Logger::INFO
        format_standard(l)
      else
        l.level = ::Logger::INFO
        format_standard(l)
      end

      l
    end
Create new logger on every invocation to make
 capturing $stderr possible