Macros
Helper macros for dealing with logging

Macros

#define CUML_LOG_TRACE(fmt, ...)
 
#define CUML_LOG_DEBUG(fmt, ...)
 
#define CUML_LOG_INFO(fmt, ...)   ML::Logger::get().log(CUML_LEVEL_INFO, fmt, ##__VA_ARGS__)
 
#define CUML_LOG_WARN(fmt, ...)   ML::Logger::get().log(CUML_LEVEL_WARN, fmt, ##__VA_ARGS__)
 
#define CUML_LOG_ERROR(fmt, ...)   ML::Logger::get().log(CUML_LEVEL_ERROR, fmt, ##__VA_ARGS__)
 
#define CUML_LOG_CRITICAL(fmt, ...)   ML::Logger::get().log(CUML_LEVEL_CRITICAL, fmt, ##__VA_ARGS__)
 

Detailed Description

Macro Definition Documentation

◆ CUML_LOG_CRITICAL

#define CUML_LOG_CRITICAL (   fmt,
  ... 
)    ML::Logger::get().log(CUML_LEVEL_CRITICAL, fmt, ##__VA_ARGS__)

◆ CUML_LOG_DEBUG

#define CUML_LOG_DEBUG (   fmt,
  ... 
)
Value:
do { \
std::stringstream ss; \
ss << ML::format("%s:%d ", __FILE__, __LINE__); \
ss << ML::format(fmt, ##__VA_ARGS__); \
ML::Logger::get().log(CUML_LEVEL_DEBUG, ss.str().c_str()); \
} while (0)
static Logger & get()
Singleton method to get the underlying logger object.
Definition: logger.cpp:52
void log(int level, const char *fmt,...)
Main logging method.
Definition: logger.cpp:96
std::string format(const char *fmt, va_list &vl)
Definition: logger.cpp:28
#define CUML_LEVEL_DEBUG
Definition: log_levels.hpp:27

◆ CUML_LOG_ERROR

#define CUML_LOG_ERROR (   fmt,
  ... 
)    ML::Logger::get().log(CUML_LEVEL_ERROR, fmt, ##__VA_ARGS__)

◆ CUML_LOG_INFO

#define CUML_LOG_INFO (   fmt,
  ... 
)    ML::Logger::get().log(CUML_LEVEL_INFO, fmt, ##__VA_ARGS__)

◆ CUML_LOG_TRACE

#define CUML_LOG_TRACE (   fmt,
  ... 
)
Value:
do { \
std::stringstream ss; \
ss << ML::format("%s:%d ", __FILE__, __LINE__); \
ss << ML::format(fmt, ##__VA_ARGS__); \
ML::Logger::get().log(CUML_LEVEL_TRACE, ss.str().c_str()); \
} while (0)
#define CUML_LEVEL_TRACE
Definition: log_levels.hpp:26

◆ CUML_LOG_WARN

#define CUML_LOG_WARN (   fmt,
  ... 
)    ML::Logger::get().log(CUML_LEVEL_WARN, fmt, ##__VA_ARGS__)