Go to the documentation of this file.
23 #include "rtabmap/utilite/utilite_export.h"
51 #define ULOGGER_LOG(level, ...) ULogger::write(level, __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__)
53 #define ULOGGER_DEBUG(...) ULOGGER_LOG(ULogger::kDebug, __VA_ARGS__)
54 #define ULOGGER_INFO(...) ULOGGER_LOG(ULogger::kInfo, __VA_ARGS__)
55 #define ULOGGER_WARN(...) ULOGGER_LOG(ULogger::kWarning, __VA_ARGS__)
56 #define ULOGGER_ERROR(...) ULOGGER_LOG(ULogger::kError, __VA_ARGS__)
57 #define ULOGGER_FATAL(...) ULOGGER_LOG(ULogger::kFatal, __VA_ARGS__) // Throw UException
59 #define UDEBUG(...) ULOGGER_DEBUG(__VA_ARGS__)
60 #define UINFO(...) ULOGGER_INFO(__VA_ARGS__)
61 #define UWARN(...) ULOGGER_WARN(__VA_ARGS__)
62 #define UERROR(...) ULOGGER_ERROR(__VA_ARGS__)
63 #define UFATAL(...) ULOGGER_FATAL(__VA_ARGS__) // Throw UException
66 #define UASSERT(condition) if(!(condition)) ULogger::write(ULogger::kFatal, __FILE__, __LINE__, __FUNCTION__, "Condition (%s) not met!", #condition)
67 #define UASSERT_MSG(condition, msg_str) if(!(condition)) ULogger::write(ULogger::kFatal, __FILE__, __LINE__, __FUNCTION__, "Condition (%s) not met! [%s]", #condition, msg_str)
244 enum Type{kTypeNoLog, kTypeConsole, kTypeFile};
252 enum Level{kDebug, kInfo, kWarning, kError, kFatal};
265 static void setType(
Type type,
const std::string &fileName = kDefaultLogFileName,
bool append =
true);
325 static void setBuffered(
bool buffered);
355 static void setTreadIdFilter(
const std::vector<std::string> & ids);
362 static void registerCurrentThread(
const std::string &
name);
363 static void unregisterCurrentThread();
364 static std::map<std::string, unsigned long> getRegisteredThreads();
383 static void write(
const char* msg, ...);
397 const char *
function,
406 static int getTime(std::string &timeStr);
475 virtual void _write(
const char*, va_list) {}
556 static const char * levelName_[5];
static bool isPrintTime()
static const std::string kDefaultLogFileName
virtual std::string getClassName() const
static std::set< unsigned long > threadIdFilter_
static void setPrintLevel(bool printLevel)
static std::map< std::string, unsigned long > registeredThreads_
static void setPrintColored(bool printColored)
static void setLevel(ULogger::Level level)
static bool printThreadID_
static ULogger * instance_
static ULogger::Level eventLevel()
static std::string bufferedMsgs_
Base * createInstance(const std::string &derived_class_name, ClassLoader *loader)
static bool printEndline_
static bool limitWhereLength_
static void setTreadIdFilter(const std::set< unsigned long > &ids)
static bool isPrintLevel()
void printTime(map< double, pair< chrono::microseconds, chrono::microseconds >> measured_time)
static void setEventLevel(ULogger::Level eventSentLevel)
static void setPrintTime(bool printTime)
virtual void _writeStr(const char *)
static bool printWhereFullPath_
static bool isPrintEndLine()
static void setPrintEndline(bool printEndline)
static std::string logFileName_
virtual void _write(const char *, va_list)
static bool isPrintColored()
static const std::set< unsigned long > & getTreadIdFilter()
static void setPrintWhere(bool printWhere)
static void setPrintWhereFullPath(bool printWhereFullPath)
static ULogger::Level level()
ULogEvent(const std::string &msg, int level)
static bool isPrintWhere()
static bool isPrintWhereFullPath()
static bool printColored_
static void setPrintThreadId(bool printThreadId)
static UDestroyer< ULogger > destroyer_
static bool isPrintThreadId()
static UMutex loggerMutex_
const std::string & getMsg() const
rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:23