src/core/utils/log.cpp
LogLevel DefaultLogger::getLevelFromString(const std::string& level) {
    if(level == "TRACE") {
        return LogLevel::TRACE;
    }
    if(level == "DEBUG") {
        return LogLevel::DEBUG;
    }
    if(level == "INFO") {
        return LogLevel::INFO;
    }
    if(level == "WARNING") {
        return LogLevel::WARNING;
    }
    if(level == "ERROR") {
        return LogLevel::ERROR;
    }
    if(level == "STATUS") {
        return LogLevel::STATUS;
    }
    if(level == "FATAL") {
        return LogLevel::FATAL;
    }

    throw std::invalid_argument("unknown log level");
}
/**
 * @throws std::invalid_argument If the string does not correspond with an existing log level
 */
@throws std::invalid_argument If the string does not correspond with an existing log level
@throws std :: invalid_argument If the string does not correspond with an existing log level
LogLevel DefaultLogger::getLevelFromString(const std::string& level) {
    if(level == "TRACE") {
        return LogLevel::TRACE;
    }
    if(level == "DEBUG") {
        return LogLevel::DEBUG;
    }
    if(level == "INFO") {
        return LogLevel::INFO;
    }
    if(level == "WARNING") {
        return LogLevel::WARNING;
    }
    if(level == "ERROR") {
        return LogLevel::ERROR;
    }
    if(level == "STATUS") {
        return LogLevel::STATUS;
    }
    if(level == "FATAL") {
        return LogLevel::FATAL;
    }
    throw std::invalid_argument("unknown log level");
}
LogLevel DefaultLogger :: getLevelFromString ( const std :: string & level ) { if ( level == " " ) { return LogLevel :: TRACE ; } if ( level == " " ) { return LogLevel :: DEBUG ; } if ( level == " " ) { return LogLevel :: INFO ; } if ( level == " " ) { return LogLevel :: WARNING ; } if ( level == " " ) { return LogLevel :: ERROR ; } if ( level == " " ) { return LogLevel :: STATUS ; } if ( level == " " ) { return LogLevel :: FATAL ; } throw std :: invalid_argument ( " " ) ; }
@throws std::invalid_argument If the string does not correspond with an existing log level
@throws std :: invalid_argument If the string does not correspond with an existing log level