Tomographer
v5.4
Tomographer C++ Framework Documentation
|
A logger we can use in tests, which calls BOOST_TEST_MESSAGE()
More...
#include <tomographer/tools/boost_test_logger.h>
Public Member Functions | |
BoostTestLogger (int level=Tomographer::Logger::DEBUG) | |
void | setLevel (int level) |
void | emitLog (int level, const char *origin, const std::string &msg) |
Public Member Functions inherited from Tomographer::Logger::LoggerBase< BoostTestLogger > | |
LoggerBase (int level_=INFO) | |
Construct the base logger object. More... | |
bool | enabledFor (int level_) const |
Check whether messages at the given log level are enabled. More... | |
int | level () const |
Get the log level set for this logger. More... | |
void | error (const char *origin, const char *fmt,...) |
emit an error message More... | |
void | error (const char *origin, std::string msg) |
emit an error message More... | |
void | error (const char *origin, Fn &&f) |
emit an error message More... | |
void | error (Args &&...) |
Special-case implementation for messages which are known to be discarded at compile time. | |
void | warning (const char *origin, const char *fmt,...) |
emit a warning message More... | |
void | warning (const char *origin, std::string msg) |
emit a warning message More... | |
void | warning (const char *origin, Fn &&f) |
emit a warning message More... | |
void | warning (Args &&...) |
Special-case implementation for messages which are known to be discarded at compile time. | |
void | info (const char *origin, const char *fmt,...) |
emit an information/notice message More... | |
void | info (const char *origin, std::string msg) |
emit an information/notice message More... | |
void | info (const char *origin, Fn &&f) |
emit an information/notice message More... | |
void | info (Args &&...) |
Special-case implementation for messages which are known to be discarded at compile time. | |
void | debug (const char *origin, const char *fmt,...) |
emit an debug message More... | |
void | debug (const char *origin, std::string msg) |
emit an debug message More... | |
void | debug (const char *origin, Fn &&f) |
emit an debug message More... | |
void | debug (Args &&...) |
Special-case implementation for messages which are known to be discarded at compile time. | |
void | longdebug (const char *origin, const char *fmt,...) |
emit a very verbose debugging message More... | |
void | longdebug (const char *origin, std::string msg) |
emit a very verbose debugging message More... | |
void | longdebug (const char *origin, Fn &&f) |
emit a very verbose debugging message More... | |
void | longdebug (Args &&...) |
Special-case implementation for messages which are known to be discarded at compile time. | |
void | log (int level, const char *origin, const char *fmt,...) |
emit a log message at the given log level. More... | |
void | log (int level, const char *origin, std::string msg) |
emit a log message at the given log level. More... | |
void | log (int level, const char *origin, Fn &&f) |
emit a log message at the given log level. More... | |
void | log (const char *origin, const char *fmt,...) |
emit a log message at the given log level. More... | |
void | log (const char *origin, const char *fmt, va_list ap) |
emit a log message at the given log level. More... | |
void | log (const char *origin, std::string msg) |
emit a log message at the given log level. More... | |
void | log (const char *origin, Fn f) |
emit a log message at the given log level. More... | |
void | log (Args &&...) |
Special-case implementation for messages which are known to be discarded at compile time. | |
Additional Inherited Members | |
Public Types inherited from Tomographer::Logger::LoggerBase< BoostTestLogger > | |
enum | |
Shortcuts to properties defined in the traits class. | |
Static Public Member Functions inherited from Tomographer::Logger::LoggerBase< BoostTestLogger > | |
static bool | staticallyEnabledFor (int level) |
Check whether the logger is statically disabled for some levels. More... | |
static constexpr bool | staticallyEnabledFor () |
Static version of staticallyEnabledFor() More... | |
Protected Member Functions inherited from Tomographer::Logger::LoggerBase< BoostTestLogger > | |
int | getLevel () const |
int | getLevel () const |
BoostTestLogger * | derived () |
const BoostTestLogger * | derived () const |
void | setLogLevel (int level) |
Store a new run-time log level. More... | |
A logger we can use in tests, which calls BOOST_TEST_MESSAGE()
A logger implementation for use when writing tests with the Boost Unit Test Framework.
This logger simply relays all messages to the BOOST_TEST_MESSAGE()
macro to display testing output.
Specify a logging level to the constructor, by default it is DEBUG
.
Definition at line 64 of file boost_test_logger.h.