clutchlog  0.5.0
Macros
High-level API macros

Macros

#define CLUTCHLOC   __FILE__, __FUNCTION__, __LINE__
 Handy shortcuts to location.
 
#define CLUTCHLOG(LEVEL, WHAT)
 Log a message at the given level. More...
 
#define CLUTCHDUMP(LEVEL, CONTAINER, FILENAME)
 Dump the given container. More...
 

Detailed Description

Macro Definition Documentation

◆ CLUTCHDUMP

#define CLUTCHDUMP (   LEVEL,
  CONTAINER,
  FILENAME 
)
Value:
{ \
auto& logger = clutchlog::logger(); \
logger.dump(clutchlog::level::LEVEL, std::begin(CONTAINER), std::end(CONTAINER), \
}
#define CLUTCHLOC
Handy shortcuts to location.
Definition: clutchlog.h:81
static clutchlog & logger()
Get the logger instance.
Definition: clutchlog.h:149
#define CLUTCHDUMP_DEFAULT_SEP
Default item separator for dump.
Definition: clutchlog.h:64

Dump the given container.

◆ CLUTCHLOG

#define CLUTCHLOG (   LEVEL,
  WHAT 
)
Value:
{ \
auto& logger = clutchlog::logger(); \
std::ostringstream msg ; msg << WHAT; \
logger.log(clutchlog::level::LEVEL, msg.str(), CLUTCHLOC); \
}
#define CLUTCHLOC
Handy shortcuts to location.
Definition: clutchlog.h:81
static clutchlog & logger()
Get the logger instance.
Definition: clutchlog.h:149

Log a message at the given level.