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

fcf::NTest::log() function

fcf::NTest::LogWriter fcf::NTest::log()

Package: fcfTest

File: test.hpp

Available from version: 1.0.1

Returns an fcf::NTest::LogWriter object for default level log messages. This level is used for simple message that require attention.

The message will only be written to the output if the current logger threshold is set to fcf::NTest::LL_LOG or upper (e.g., fcf::NTest::LL_ALL, fcf::NTest::LL_INF, fcf::NTest::LL_DBG, fcf::NTest::LL_TRC).

Result
fcf::NTest::LogWriter
- An RAII-based stream wrapper used to buffer log messages before sending them to the logger.

Example: Basic Logging

Directly outputting a message.

#define FCF_TEST_IMPLEMENTATION #include <fcfTest/test.hpp> int main() { // This will be printed because the default level is fcf::NTest::LL_LOG fcf::NTest::log() << "The application is running." << std::endl; return 0; }

Output:

> The application is running.