WHY_CPP  0.1
Macros | Typedefs | Enumerations | Functions

Functions to write logs into console. More...

Macros

#define LOG_VERBOSE(FMT, ...)   LogMessage(VERBOSE, FMT, ## __VA_ARGS__)
 
#define LOG_DEBUG(FMT, ...)   LogMessage(DEBUG, FMT, ## __VA_ARGS__)
 
#define LOG_INFO(FMT, ...)   LogMessage(INFO, FMT, ## __VA_ARGS__)
 
#define LOG_WARN(FMT, ...)   LogMessage(WARN, FMT, ## __VA_ARGS__)
 
#define LOG_ERROR(FMT, ...)   LogMessage(ERROR, FMT, ## __VA_ARGS__)
 
#define LOG_CRITICAL(FMT, ...)   LogMessage(CRITICAL, FMT, ## __VA_ARGS__)
 

Typedefs

typedef enum LogLevel LogLevel_t
 

Enumerations

enum  LogLevel {
  VERBOSE = 1, DEBUG, INFO, WARN,
  ERROR, CRITICAL
}
 

Functions

WHYCPP_C_API void LogMessage (LogLevel_t level, const char *fmt,...)
 
WHYCPP_C_API void SetLogLevel (LogLevel_t priority)
 

Detailed Description

Functions to write logs into console.

Function Documentation

WHYCPP_C_API void LogMessage ( LogLevel_t  level,
const char *  fmt,
  ... 
)

Pri32 a message to the console. It works like printf.

Parameters
level
fmtprintf-style format string
...
WHYCPP_C_API void SetLogLevel ( LogLevel_t  priority)

Set global application log level. To see library messages you need to set DEBUG level.

Parameters
priority