fcf::NTest::Logger::Writer
fcf::NTest::att(
unsigned int a_messageCategory
= fcf::NTest::LMC_USER_GROUP)
Package: fcfTest
File:
test.hpp
(
link_to_the_declaration_in_the_file
,
link_to_the_implementation_in_the_file
)
Available from version: 1.0.1
Returns an fcf::NTest::Logger::Writer object for attention-level log messages. This level is used for important message that require attention.
The message will only be written to the output if the current logger threshold is set to fcf::NTest::LL_ATT or upper (e.g., fcf::NTest::LL_ALL, fcf::NTest::LL_LOG, fcf::NTest::LL_INF, fcf::NTest::LL_DBG, fcf::NTest::LL_TRC).
Arguments
unsigned int a_messageCategory = fcf::NTest::LMC_USER_GROUP
- [SINCE 1.1.14] integer category identifier.
Result
fcf::NTest::Logger::Writer
- An RAII-based stream wrapper used to buffer log messages before sending them to the logger.
Example: Basic Attention Logging
Directly outputting a attention 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_ATT)
fcf::NTest::att() << "Database connection" << std::endl;
return 0;
}
Output:
> Database connection