def level=(severity)
      if severity.is_a?(Integer)
        @logger.level = severity
      else
        levels = %w[debug info warn error fatal unknown]
        raise ArgumentError, "invalid log level: #{severity}" unless levels.include? severity.to_s.downcase

        @logger.level = severity.to_s.upcase
      end
    end
def level=(severity)
      if severity.is_a?(Integer)
        @logger.level = severity
      else
        levels = %w[debug info warn error fatal unknown]
        raise ArgumentError, "invalid log level: #{severity}" unless levels.include? severity.to_s.downcase

        @logger.level = severity.to_s.upcase
      end
    end
For Ruby < 2.4 compatibility
 Based on https://github.com/ruby/ruby/blob/ruby_2_3/lib/logger.rb#L250