19 #include <mrpt/system/datetime.h>
20 #include <mrpt/poses/CPose3D.h>
21 #include <mrpt/version.h>
22 #include <log4cxx/logger.h>
24 #if MRPT_VERSION >= 0x199
25 #include <mrpt/system/COutputLogger.h>
26 #include <mrpt/math/TPose3D.h>
27 using namespace mrpt::system;
29 #include <mrpt/utils/COutputLogger.h>
41 using namespace log4cxx;
44 VerbosityLevel mrpt_lvl;
46 if (lvl == Level::getFatal() || lvl == Level::getError())
50 else if (lvl == Level::getWarn())
54 else if (lvl == Level::getInfo())
58 else if (lvl == Level::getDebug())
64 THROW_EXCEPTION(
"Unknown log4cxx::Level is given.");
79 const std::string& msg,
const VerbosityLevel level,
80 const std::string& loggerName,
const mrpt::system::TTimeStamp timestamp)
83 std::string tmsg = msg;
85 tmsg.compare(tmsg.length() - 1, tmsg.length(),
"\n") == 0)
87 tmsg.erase(tmsg.end() - 1);
90 if (level == LVL_DEBUG)
94 else if (level == LVL_INFO)
98 else if (level == LVL_WARN)
102 else if (level == LVL_ERROR)
108 const std::string& msg,
const VerbosityLevel level,
109 const std::string& loggerName,
const mrpt::system::TTimeStamp timestamp,
115 inline mrpt::math::TPose3D
p2t(
const mrpt::poses::CPose3D& p)
117 #if MRPT_VERSION >= 0x199
120 return mrpt::math::TPose3D(p);