#include <mrpt/typemeta/TEnumType.h>
#include <mrpt/system/os.h>
#include <mrpt/system/CTicTac.h>
#include <mrpt/system/datetime.h>
#include <string>
#include <deque>
#include <sstream>
#include <iosfwd>
#include <functional>
Go to the source code of this file.
Classes | |
class | mrpt::system::COutputLogger |
Versatile class for consistent logging and management of output messages. More... | |
struct | mrpt::system::COutputLogger::TMsg |
Struct responsible of holding information relevant to the message (in std::string form) issued by the user. More... | |
struct | mrpt::system::COutputLoggerStreamWrapper |
For use in MRPT_LOG_DEBUG_STREAM(), etc. More... | |
Namespaces | |
mrpt | |
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries. | |
mrpt::system | |
This namespace provides a OS-independent interface to many useful functions: filenames manipulation, time and date, string parsing, file I/O, threading, memory allocation, etc. | |
Macros | |
#define | INTERNAL_MRPT_LOG(_LVL, _STRING) this->logStr(_LVL, _STRING) |
#define | INTERNAL_MRPT_LOG_ONCE(_LVL, _STRING) |
#define | INTERNAL_MRPT_LOG_FMT(_LVL, _FMT_STRING, ...) |
#define | INTERNAL_MRPT_LOG_STREAM(_LVL, __CONTENTS) |
#define | INTERNAL_MRPT_LOG_THROTTLE(_LVL, _PERIOD_SECONDS, _STRING) |
#define | INTERNAL_MRPT_LOG_THROTTLE_STREAM(_LVL, _PERIOD_SECONDS, __CONTENTS) |
#define | INTERNAL_MRPT_LOG_THROTTLE_FMT( _LVL, _PERIOD_SECONDS, _FMT_STRING, ...) |
#define | MRPT_LOG_DEBUG(_STRING) INTERNAL_MRPT_LOG(::mrpt::system::LVL_DEBUG, _STRING) |
Use: MRPT_LOG_DEBUG("message"); More... | |
#define | MRPT_LOG_INFO(_STRING) INTERNAL_MRPT_LOG(::mrpt::system::LVL_INFO, _STRING) |
#define | MRPT_LOG_WARN(_STRING) INTERNAL_MRPT_LOG(::mrpt::system::LVL_WARN, _STRING) |
#define | MRPT_LOG_ERROR(_STRING) INTERNAL_MRPT_LOG(::mrpt::system::LVL_ERROR, _STRING) |
#define | MRPT_LOG_ONCE_DEBUG(_STRING) INTERNAL_MRPT_LOG_ONCE(::mrpt::system::LVL_DEBUG, _STRING) |
Use: MRPT_LOG_ONCE_DEBUG("once-only message"); More... | |
#define | MRPT_LOG_ONCE_INFO(_STRING) INTERNAL_MRPT_LOG_ONCE(::mrpt::system::LVL_INFO, _STRING) |
#define | MRPT_LOG_ONCE_WARN(_STRING) INTERNAL_MRPT_LOG_ONCE(::mrpt::system::LVL_WARN, _STRING) |
#define | MRPT_LOG_ONCE_ERROR(_STRING) INTERNAL_MRPT_LOG_ONCE(::mrpt::system::LVL_ERROR, _STRING) |
#define | MRPT_LOG_THROTTLE_DEBUG(_PERIOD_SECONDS, _STRING) |
Use: MRPT_LOG_THROTTLE_DEBUG(5.0, "message"); More... | |
#define | MRPT_LOG_THROTTLE_INFO(_PERIOD_SECONDS, _STRING) |
#define | MRPT_LOG_THROTTLE_WARN(_PERIOD_SECONDS, _STRING) |
#define | MRPT_LOG_THROTTLE_ERROR(_PERIOD_SECONDS, _STRING) |
#define | MRPT_LOG_DEBUG_FMT(_FMT_STRING, ...) INTERNAL_MRPT_LOG_FMT(::mrpt::system::LVL_DEBUG, _FMT_STRING, __VA_ARGS__) |
Use: MRPT_LOG_DEBUG_FMT("i=%u", i); More... | |
#define | MRPT_LOG_INFO_FMT(_FMT_STRING, ...) INTERNAL_MRPT_LOG_FMT(::mrpt::system::LVL_INFO, _FMT_STRING, __VA_ARGS__) |
#define | MRPT_LOG_WARN_FMT(_FMT_STRING, ...) INTERNAL_MRPT_LOG_FMT(::mrpt::system::LVL_WARN, _FMT_STRING, __VA_ARGS__) |
#define | MRPT_LOG_ERROR_FMT(_FMT_STRING, ...) INTERNAL_MRPT_LOG_FMT(::mrpt::system::LVL_ERROR, _FMT_STRING, __VA_ARGS__) |
#define | MRPT_LOG_DEBUG_STREAM(__CONTENTS) INTERNAL_MRPT_LOG_STREAM(::mrpt::system::LVL_DEBUG, __CONTENTS) |
Use: MRPT_LOG_DEBUG_STREAM("Var=" << value << " foo=" << foo_var); More... | |
#define | MRPT_LOG_INFO_STREAM(__CONTENTS) INTERNAL_MRPT_LOG_STREAM(::mrpt::system::LVL_INFO, __CONTENTS) |
#define | MRPT_LOG_WARN_STREAM(__CONTENTS) INTERNAL_MRPT_LOG_STREAM(::mrpt::system::LVL_WARN, __CONTENTS) |
#define | MRPT_LOG_ERROR_STREAM(__CONTENTS) INTERNAL_MRPT_LOG_STREAM(::mrpt::system::LVL_ERROR, __CONTENTS) |
#define | MRPT_LOG_THROTTLE_DEBUG_STREAM(_PERIOD_SECONDS, __CONTENTS) |
Usage: MRPT_LOG_THROTTLE_DEBUG_STREAM(5.0, "Var=" << value << " foo=" << foo_var); More... | |
#define | MRPT_LOG_THROTTLE_INFO_STREAM(_PERIOD_SECONDS, __CONTENTS) |
#define | MRPT_LOG_THROTTLE_WARN_STREAM(_PERIOD_SECONDS, __CONTENTS) |
#define | MRPT_LOG_THROTTLE_ERROR_STREAM(_PERIOD_SECONDS, __CONTENTS) |
#define | MRPT_LOG_THROTTLE_DEBUG_FMT(_PERIOD_SECONDS, _FMT_STRING, ...) |
Usage: MRPT_LOG_THROTTLE_DEBUG_FMT(5.0, "i=%u", i); More... | |
#define | MRPT_LOG_THROTTLE_INFO_FMT(_PERIOD_SECONDS, _FMT_STRING, ...) |
#define | MRPT_LOG_THROTTLE_WARN_FMT(_PERIOD_SECONDS, _FMT_STRING, ...) |
#define | MRPT_LOG_THROTTLE_ERROR_FMT(_PERIOD_SECONDS, _FMT_STRING, ...) |
#define | DEFAULT_LOGLVL_MRPT_UNSCOPED ::mrpt::system::LVL_DEBUG |
#define | MRPT_UNSCOPED_LOGGER_START |
For calling any MRPT_LOG_*() macro from outside of an object inherited from COutputLogger. More... | |
#define | MRPT_UNSCOPED_LOGGER_END |
Typedefs | |
using | mrpt::system::output_logger_callback_t = std::function< void(const std::string &msg, const mrpt::system::VerbosityLevel level, const std::string &loggerName, const mrpt::system::TTimeStamp timestamp)> |
Callback types for use with mrpt::system::COuputLogger. More... | |
Enumerations | |
enum | mrpt::system::VerbosityLevel { mrpt::system::LVL_DEBUG = 0, mrpt::system::LVL_INFO, mrpt::system::LVL_WARN, mrpt::system::LVL_ERROR, mrpt::system::NUMBER_OF_VERBOSITY_LEVELS } |
Enumeration of available verbosity levels. More... | |
Functions | |
MRPT_FILL_ENUM (LVL_DEBUG) | |
MRPT_FILL_ENUM (LVL_INFO) | |
MRPT_FILL_ENUM (LVL_WARN) | |
MRPT_FILL_ENUM (LVL_ERROR) | |
MRPT_FILL_ENUM_CUSTOM_NAME (LVL_DEBUG, "DEBUG") | |
MRPT_FILL_ENUM_CUSTOM_NAME (LVL_INFO, "INFO") | |
MRPT_FILL_ENUM_CUSTOM_NAME (LVL_WARN, "WARN") | |
MRPT_FILL_ENUM_CUSTOM_NAME (LVL_ERROR, "ERROR") | |
#define DEFAULT_LOGLVL_MRPT_UNSCOPED ::mrpt::system::LVL_DEBUG |
Definition at line 512 of file system/COutputLogger.h.
#define INTERNAL_MRPT_LOG | ( | _LVL, | |
_STRING | |||
) | this->logStr(_LVL, _STRING) |
Definition at line 350 of file system/COutputLogger.h.
#define INTERNAL_MRPT_LOG_FMT | ( | _LVL, | |
_FMT_STRING, | |||
... | |||
) |
Definition at line 363 of file system/COutputLogger.h.
#define INTERNAL_MRPT_LOG_ONCE | ( | _LVL, | |
_STRING | |||
) |
Definition at line 352 of file system/COutputLogger.h.
#define INTERNAL_MRPT_LOG_STREAM | ( | _LVL, | |
__CONTENTS | |||
) |
Definition at line 372 of file system/COutputLogger.h.
#define INTERNAL_MRPT_LOG_THROTTLE | ( | _LVL, | |
_PERIOD_SECONDS, | |||
_STRING | |||
) |
Definition at line 382 of file system/COutputLogger.h.
#define INTERNAL_MRPT_LOG_THROTTLE_FMT | ( | _LVL, | |
_PERIOD_SECONDS, | |||
_FMT_STRING, | |||
... | |||
) |
Definition at line 411 of file system/COutputLogger.h.
#define INTERNAL_MRPT_LOG_THROTTLE_STREAM | ( | _LVL, | |
_PERIOD_SECONDS, | |||
__CONTENTS | |||
) |
Definition at line 396 of file system/COutputLogger.h.
#define MRPT_LOG_DEBUG | ( | _STRING | ) | INTERNAL_MRPT_LOG(::mrpt::system::LVL_DEBUG, _STRING) |
Use: MRPT_LOG_DEBUG("message");
Definition at line 427 of file system/COutputLogger.h.
#define MRPT_LOG_DEBUG_FMT | ( | _FMT_STRING, | |
... | |||
) | INTERNAL_MRPT_LOG_FMT(::mrpt::system::LVL_DEBUG, _FMT_STRING, __VA_ARGS__) |
Use: MRPT_LOG_DEBUG_FMT("i=%u", i);
Definition at line 461 of file system/COutputLogger.h.
#define MRPT_LOG_DEBUG_STREAM | ( | __CONTENTS | ) | INTERNAL_MRPT_LOG_STREAM(::mrpt::system::LVL_DEBUG, __CONTENTS) |
Use: MRPT_LOG_DEBUG_STREAM("Var=" << value << " foo=" << foo_var);
Definition at line 471 of file system/COutputLogger.h.
#define MRPT_LOG_ERROR | ( | _STRING | ) | INTERNAL_MRPT_LOG(::mrpt::system::LVL_ERROR, _STRING) |
Definition at line 433 of file system/COutputLogger.h.
#define MRPT_LOG_ERROR_FMT | ( | _FMT_STRING, | |
... | |||
) | INTERNAL_MRPT_LOG_FMT(::mrpt::system::LVL_ERROR, _FMT_STRING, __VA_ARGS__) |
Definition at line 467 of file system/COutputLogger.h.
#define MRPT_LOG_ERROR_STREAM | ( | __CONTENTS | ) | INTERNAL_MRPT_LOG_STREAM(::mrpt::system::LVL_ERROR, __CONTENTS) |
Definition at line 477 of file system/COutputLogger.h.
#define MRPT_LOG_INFO | ( | _STRING | ) | INTERNAL_MRPT_LOG(::mrpt::system::LVL_INFO, _STRING) |
Definition at line 429 of file system/COutputLogger.h.
#define MRPT_LOG_INFO_FMT | ( | _FMT_STRING, | |
... | |||
) | INTERNAL_MRPT_LOG_FMT(::mrpt::system::LVL_INFO, _FMT_STRING, __VA_ARGS__) |
Definition at line 463 of file system/COutputLogger.h.
#define MRPT_LOG_INFO_STREAM | ( | __CONTENTS | ) | INTERNAL_MRPT_LOG_STREAM(::mrpt::system::LVL_INFO, __CONTENTS) |
Definition at line 473 of file system/COutputLogger.h.
#define MRPT_LOG_ONCE_DEBUG | ( | _STRING | ) | INTERNAL_MRPT_LOG_ONCE(::mrpt::system::LVL_DEBUG, _STRING) |
Use: MRPT_LOG_ONCE_DEBUG("once-only message");
Definition at line 437 of file system/COutputLogger.h.
#define MRPT_LOG_ONCE_ERROR | ( | _STRING | ) | INTERNAL_MRPT_LOG_ONCE(::mrpt::system::LVL_ERROR, _STRING) |
Definition at line 443 of file system/COutputLogger.h.
#define MRPT_LOG_ONCE_INFO | ( | _STRING | ) | INTERNAL_MRPT_LOG_ONCE(::mrpt::system::LVL_INFO, _STRING) |
Definition at line 439 of file system/COutputLogger.h.
#define MRPT_LOG_ONCE_WARN | ( | _STRING | ) | INTERNAL_MRPT_LOG_ONCE(::mrpt::system::LVL_WARN, _STRING) |
Definition at line 441 of file system/COutputLogger.h.
#define MRPT_LOG_THROTTLE_DEBUG | ( | _PERIOD_SECONDS, | |
_STRING | |||
) |
Use: MRPT_LOG_THROTTLE_DEBUG(5.0, "message");
Definition at line 447 of file system/COutputLogger.h.
#define MRPT_LOG_THROTTLE_DEBUG_FMT | ( | _PERIOD_SECONDS, | |
_FMT_STRING, | |||
... | |||
) |
Usage: MRPT_LOG_THROTTLE_DEBUG_FMT(5.0, "i=%u", i);
Definition at line 496 of file system/COutputLogger.h.
#define MRPT_LOG_THROTTLE_DEBUG_STREAM | ( | _PERIOD_SECONDS, | |
__CONTENTS | |||
) |
Usage: MRPT_LOG_THROTTLE_DEBUG_STREAM(5.0, "Var=" << value << " foo=" << foo_var);
Definition at line 482 of file system/COutputLogger.h.
#define MRPT_LOG_THROTTLE_ERROR | ( | _PERIOD_SECONDS, | |
_STRING | |||
) |
Definition at line 456 of file system/COutputLogger.h.
#define MRPT_LOG_THROTTLE_ERROR_FMT | ( | _PERIOD_SECONDS, | |
_FMT_STRING, | |||
... | |||
) |
Definition at line 505 of file system/COutputLogger.h.
#define MRPT_LOG_THROTTLE_ERROR_STREAM | ( | _PERIOD_SECONDS, | |
__CONTENTS | |||
) |
Definition at line 491 of file system/COutputLogger.h.
#define MRPT_LOG_THROTTLE_INFO | ( | _PERIOD_SECONDS, | |
_STRING | |||
) |
Definition at line 450 of file system/COutputLogger.h.
#define MRPT_LOG_THROTTLE_INFO_FMT | ( | _PERIOD_SECONDS, | |
_FMT_STRING, | |||
... | |||
) |
Definition at line 499 of file system/COutputLogger.h.
#define MRPT_LOG_THROTTLE_INFO_STREAM | ( | _PERIOD_SECONDS, | |
__CONTENTS | |||
) |
Definition at line 485 of file system/COutputLogger.h.
#define MRPT_LOG_THROTTLE_WARN | ( | _PERIOD_SECONDS, | |
_STRING | |||
) |
Definition at line 453 of file system/COutputLogger.h.
#define MRPT_LOG_THROTTLE_WARN_FMT | ( | _PERIOD_SECONDS, | |
_FMT_STRING, | |||
... | |||
) |
Definition at line 502 of file system/COutputLogger.h.
#define MRPT_LOG_THROTTLE_WARN_STREAM | ( | _PERIOD_SECONDS, | |
__CONTENTS | |||
) |
Definition at line 488 of file system/COutputLogger.h.
#define MRPT_LOG_WARN | ( | _STRING | ) | INTERNAL_MRPT_LOG(::mrpt::system::LVL_WARN, _STRING) |
Definition at line 431 of file system/COutputLogger.h.
#define MRPT_LOG_WARN_FMT | ( | _FMT_STRING, | |
... | |||
) | INTERNAL_MRPT_LOG_FMT(::mrpt::system::LVL_WARN, _FMT_STRING, __VA_ARGS__) |
Definition at line 465 of file system/COutputLogger.h.
#define MRPT_LOG_WARN_STREAM | ( | __CONTENTS | ) | INTERNAL_MRPT_LOG_STREAM(::mrpt::system::LVL_WARN, __CONTENTS) |
Definition at line 475 of file system/COutputLogger.h.
#define MRPT_UNSCOPED_LOGGER_END |
Definition at line 544 of file system/COutputLogger.h.
#define MRPT_UNSCOPED_LOGGER_START |
For calling any MRPT_LOG_*()
macro from outside of an object inherited from COutputLogger.
Debug level is DEBUG
if build with _DEBUG
preprocessor flag, INFO
otherwise. Use:
Definition at line 527 of file system/COutputLogger.h.
MRPT_FILL_ENUM | ( | LVL_DEBUG | ) |
MRPT_FILL_ENUM | ( | LVL_ERROR | ) |
MRPT_FILL_ENUM | ( | LVL_INFO | ) |
MRPT_FILL_ENUM | ( | LVL_WARN | ) |
MRPT_FILL_ENUM_CUSTOM_NAME | ( | LVL_DEBUG | , |
"DEBUG" | |||
) |
MRPT_FILL_ENUM_CUSTOM_NAME | ( | LVL_ERROR | , |
"ERROR" | |||
) |
MRPT_FILL_ENUM_CUSTOM_NAME | ( | LVL_INFO | , |
"INFO" | |||
) |
MRPT_FILL_ENUM_CUSTOM_NAME | ( | LVL_WARN | , |
"WARN" | |||
) |
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST |