AIToolbox
A library that offers tools for AI problem solving.
Logging.hpp File Reference
#include <sstream>

Go to the source code of this file.

Namespaces

 AIToolbox
 
 AIToolbox::Impl
 

Macros

#define AI_SEVERITY_DEBUG   0
 
#define AI_SEVERITY_INFO   1
 
#define AI_SEVERITY_WARNING   2
 
#define AI_SEVERITY_ERROR   3
 
#define AI_LOGGER(SEV, ARGS)
 

Typedefs

using AIToolbox::AILoggerFun = void(int, const char *)
 

Variables

AILoggerFun * AIToolbox::AILogger = nullptr
 This pointer defines the function used to log. More...
 
char AIToolbox::Impl::logBuffer [500] = {0}
 

Macro Definition Documentation

◆ AI_LOGGER

#define AI_LOGGER (   SEV,
  ARGS 
)
Value:
do { \
if (AILogger) { \
std::stringstream internal_stringstream_; \
internal_stringstream_.rdbuf()->pubsetbuf( \
); \
internal_stringstream_ << ARGS << '\0'; \
AILogger(SEV, AIToolbox::Impl::logBuffer); \
} \
} while(0)

◆ AI_SEVERITY_DEBUG

#define AI_SEVERITY_DEBUG   0

◆ AI_SEVERITY_ERROR

#define AI_SEVERITY_ERROR   3

◆ AI_SEVERITY_INFO

#define AI_SEVERITY_INFO   1

◆ AI_SEVERITY_WARNING

#define AI_SEVERITY_WARNING   2
AIToolbox::Impl::logBuffer
char logBuffer[500]
Definition: Logging.hpp:96
AIToolbox::AILogger
AILoggerFun * AILogger
This pointer defines the function used to log.
Definition: Logging.hpp:89