Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
log.h File Reference
#include <momentum/common/checks.h>
#include <map>
#include <string>

Go to the source code of this file.

Namespaces

namespace  momentum

Macros

#define MT_LOGT(...)
#define MT_LOGD(...)
#define MT_LOGI(...)
#define MT_LOGW(...)
#define MT_LOGE(...)
#define MT_LOGT_IF(condition, ...)
#define MT_LOGD_IF(condition, ...)
#define MT_LOGI_IF(condition, ...)
#define MT_LOGW_IF(condition, ...)
#define MT_LOGE_IF(condition, ...)
#define MT_LOGT_ONCE(...)
#define MT_LOGD_ONCE(...)
#define MT_LOGI_ONCE(...)
#define MT_LOGW_ONCE(...)
#define MT_LOGE_ONCE(...)
#define MT_LOGT_ONCE_IF(condition, ...)
#define MT_LOGD_ONCE_IF(condition, ...)
#define MT_LOGI_ONCE_IF(condition, ...)
#define MT_LOGW_ONCE_IF(condition, ...)
#define MT_LOGE_ONCE_IF(condition, ...)

Enumerations

enum class  momentum::LogLevel {
  momentum::Disabled = 0 , momentum::Error , momentum::Warning , momentum::Info ,
  momentum::Debug , momentum::Trace
}
 Logging levels in ascending order of verbosity. More...

Functions

std::map< std::string, LogLevel > momentum::logLevelMap ()
 Returns the canonical mapping from human-readable level names ("Disabled", "Error", "Warning", "Info", "Debug", "Trace") to LogLevel values.
void momentum::setLogLevel (LogLevel level)
 Sets the global log threshold; messages below level are filtered out.
void momentum::setLogLevel (const std::string &levelStr)
 Parses levelStr (case-insensitive: "TRACE", "DEBUG", "INFO", "WARNING", "ERROR", "DISABLED") and forwards to setLogLevel(LogLevel).
LogLevel momentum::getLogLevel ()
 Returns the current global log threshold.

Macro Definition Documentation

◆ MT_LOGD

◆ MT_LOGD_IF

#define MT_LOGD_IF ( condition,
... )

Definition at line 184 of file log.h.

◆ MT_LOGD_ONCE

#define MT_LOGD_ONCE ( ...)

Definition at line 190 of file log.h.

◆ MT_LOGD_ONCE_IF

#define MT_LOGD_ONCE_IF ( condition,
... )

Definition at line 196 of file log.h.

◆ MT_LOGE

◆ MT_LOGE_IF

#define MT_LOGE_IF ( condition,
... )

Definition at line 187 of file log.h.

◆ MT_LOGE_ONCE

#define MT_LOGE_ONCE ( ...)

Definition at line 193 of file log.h.

◆ MT_LOGE_ONCE_IF

#define MT_LOGE_ONCE_IF ( condition,
... )

Definition at line 199 of file log.h.

◆ MT_LOGI

◆ MT_LOGI_IF

◆ MT_LOGI_ONCE

#define MT_LOGI_ONCE ( ...)

Definition at line 191 of file log.h.

◆ MT_LOGI_ONCE_IF

#define MT_LOGI_ONCE_IF ( condition,
... )

Definition at line 197 of file log.h.

◆ MT_LOGT

#define MT_LOGT ( ...)

◆ MT_LOGT_IF

#define MT_LOGT_IF ( condition,
... )

Definition at line 183 of file log.h.

◆ MT_LOGT_ONCE

#define MT_LOGT_ONCE ( ...)

Definition at line 189 of file log.h.

◆ MT_LOGT_ONCE_IF

#define MT_LOGT_ONCE_IF ( condition,
... )

Definition at line 195 of file log.h.

◆ MT_LOGW

◆ MT_LOGW_IF

◆ MT_LOGW_ONCE

#define MT_LOGW_ONCE ( ...)

Definition at line 192 of file log.h.

Referenced by momentum::parameterLimitsFromJson(), and momentum::parseParameterLimits().

◆ MT_LOGW_ONCE_IF

#define MT_LOGW_ONCE_IF ( condition,
... )

Definition at line 198 of file log.h.