function severityFromString(level) {
    if (level === 'warn')
        return Severity.Warning;
    if (isSupportedSeverity(level)) {
        return level;
    }
    return Severity.Log;
}
Converts a string-based level into a {@link Severity}.

@param level string representation of Severity
@returns Severity