FCF 2.0 development in progress...
> > > > > >
[News] [C++ Libraries API] [C++ Downloads] [Donate to the project] [Contacts]

toLevel() static method from fcf::NTest::Logger class

[STATIC] fcf::NTest::ELogLevel toLevel(std::string a_level, fcf::NTest::ELogLevel a_default = fcf::NTest::LL_LOG)

Class: fcf::NTest::Logger

Package: fcfTest

File: test.hpp

Available from version: 1.0.1

Converts a string representation of a log level to its enum value.

If the value "def" is passed, the function returns the value passed in the argument a_default.

Arguments

std::string a_level
- current level of logging in string presentation.

Valid identifiers include: "def", "off", "ftl", "err", "wrn", "att", "log", "inf", "dbg", "trc", "all"

fcf::NTest::ELogLevel a_default = fcf::NTest::LL_LOG
- The default value. This value is set if the string "def" is passed or an unacceptable combination.
Result
fcf::NTest::ELogLevel
- The corresponding fcf::NTest::ELogLevel enum