20 #define BOOST_TEST_MODULE debug - logger 22 #if BOOST_VERSION >= 105900 23 #include <boost/test/tools/output_test_stream.hpp> 25 #include <boost/test/output_test_stream.hpp> 27 #include <boost/date_time/posix_time/posix_time.hpp> 28 #include <boost/test/unit_test.hpp> 29 #include <boost/thread/thread.hpp> 31 using boost::test_tools::output_test_stream;
52 sendMsg(
"This is a message of level MSG_TYPE_DEBUG_STREAM",
54 sendMsg(
"This is a message of level MSG_TYPE_INFO_STREAM",
56 sendMsg(
"This is a message of level MSG_TYPE_WARNING_STREAM",
58 sendMsg(
"This is a message of level MSG_TYPE_ERROR_STREAM",
75 "CustomEntity",
"my-entity-2")));
77 for (
unsigned int i = 0; i < 1000; i++) {
This class represents an entity, i.e. a generic computational unit that provides input and output sig...
void sendMsg(const std::string &msg, MsgType t=MSG_TYPE_INFO, const std::string &lineId="")
Send messages msg with level t. Add string file and line to message.
BOOST_AUTO_TEST_CASE(debug_logger_wrong_initialization)
static const std::string CLASS_NAME
virtual const std::string & getClassName() const
bool setTimeSample(double t)
void setVerbosity(LoggerVerbosity lv)
bool setStreamPrintPeriod(double s)
CustomEntity(const std::string &n)
Entity(const std::string &name)
LoggerVerbosity getVerbosity()
Entity * newEntity(const std::string &classname, const std::string &objname) const
Instantiate (and allocate) an entity.
static FactoryStorage * getInstance()
Get pointer to unique object of the class.
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(CustomEntity, "CustomEntity")
static RealTimeLogger & instance()