def levelWithName(cls, name):
        """
        Get the log level with the given name.

        @param name: The name of a log level.
        @type name: L{str} (native string)

        @return: The L{LogLevel} with the specified C{name}.
        @rtype: L{LogLevel}

        @raise InvalidLogLevelError: if the C{name} does not name a valid log
            level.
        """
        try:
            return cls.lookupByName(name)
        except ValueError:
            raise InvalidLogLevelError(name)

        Get the log level with the given name.

        @param name: The name of a log level.
        @type name: L{str} (native string)

        @return: The L{LogLevel} with the specified C{name}.
        @rtype: L{LogLevel}

        @raise InvalidLogLevelError: if the C{name} does not name a valid log
            level.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/logger/_levels.py