SOPT
Sparse OPTimisation
Macros
Logging macros

Macros

#define SOPT_MSG_LVL(lvl, ...)
 Neat CPU-conserving logging macros. Use by preference! More...
 
#define SOPT_LOG_(TYPE, ...)    SOPT_MSG_LVL(sopt::logging::Log::TYPE, __VA_ARGS__)
 \macro For internal use only More...
 

Detailed Description

Macro Definition Documentation

◆ SOPT_LOG_

#define SOPT_LOG_ (   TYPE,
  ... 
)     SOPT_MSG_LVL(sopt::logging::Log::TYPE, __VA_ARGS__)

\macro For internal use only

Definition at line 200 of file logging.h.

◆ SOPT_MSG_LVL

#define SOPT_MSG_LVL (   lvl,
  ... 
)
Value:
do { \
if (sopt::logging::getLog().isActive(lvl)) { \
sopt::logging::getLog() << lvl << sopt::logging::mkFormattedString(__VA_ARGS__) << '\n'; \
} \
} while (0)
Log & getLog()
Access method to default Log object.
Definition: logging.h:151
std::string mkFormattedString(const char *txt, Args &&... args)
Helper method to construct formatted string.
Definition: logging.h:175

Neat CPU-conserving logging macros. Use by preference!

Note
Only usable in classes where a getLog() method is provided

Definition at line 192 of file logging.h.