wrn() method from fcf::NTest::Logger class
Class:
Package: fcfTest
File: test.hpp
Available from version: 1.0.1
Returns a reference to the output stream for warning-level log messages. This level is used for warnings that require immediate attention.
The message will only be written to the output if the current logger threshold is set to
Result
- A reference to the stream used for warning logging. If the log level is too high, this returns a reference to an empty stream buffer.
Example: Basic Warnig Logging
Directly outputting a warning message.
#define FCF_TEST_IMPLEMENTATION
#include <fcfTest/test.hpp>
int main() {
// This will be printed because the default level is fcf::NTest::LL_LOG (which includes fcf::NTest::LL_WRN )
fcf::NTest::logger ().wrn () << "Database connection (is too long)!" << std::endl;
return 0;
}
Output:
Database connection (is too long)!
VPSDime is an industry leading VPS hosting company that provides virtualized server services with high performance, availability and friendly support.