def level=(severity)
      if severity.is_a?(Integer)
        @logger.level = severity
      else
        case severity.to_s.downcase
        when 'debug'
          @logger.level = DEBUG
        when 'info'
          @logger.level = INFO
        when 'warn'
          @logger.level = WARN
        when 'error'
          @logger.level = ERROR
        when 'fatal'
          @logger.level = FATAL
        when 'unknown'
          @logger.level = UNKNOWN
        else
          raise ArgumentError, "invalid log level: #{severity}"
        end
      end
    end
def level=(severity)
      if severity.is_a?(Integer)
        @logger.level = severity
      else
        case severity.to_s.downcase
        when 'debug'
          @logger.level = DEBUG
        when 'info'
          @logger.level = INFO
        when 'warn'
          @logger.level = WARN
        when 'error'
          @logger.level = ERROR
        when 'fatal'
          @logger.level = FATAL
        when 'unknown'
          @logger.level = UNKNOWN
        else
          raise ArgumentError, "invalid log level: #{severity}"
        end
      end
    end
For Ruby < 2.3 compatibility
 Based on https://github.com/ruby/ruby/blob/ruby_2_3/lib/logger.rb#L250