AIToolbox
A library that offers tools for AI problem solving.
|
Go to the documentation of this file.
61 #ifndef AI_TOOLBOX_LOGGING_HEADER_FILE
62 #define AI_TOOLBOX_LOGGING_HEADER_FILE
64 #ifndef AI_LOGGING_ENABLED
65 #define AI_LOGGING_ENABLED 0
68 #define AI_SEVERITY_DEBUG 0
69 #define AI_SEVERITY_INFO 1
70 #define AI_SEVERITY_WARNING 2
71 #define AI_SEVERITY_ERROR 3
73 #if AI_LOGGING_ENABLED == 1
105 template <
typename T>
106 FakeLogger &
operator<<(
const T&) {
return *
this; }
112 #if AI_LOGGING_ENABLED == 1
114 #define AI_LOGGER(SEV, ARGS) \
117 std::stringstream internal_stringstream_; \
118 internal_stringstream_.rdbuf()->pubsetbuf( \
119 AIToolbox::Impl::logBuffer, \
120 sizeof(AIToolbox::Impl::logBuffer) - 1 \
122 internal_stringstream_ << ARGS << '\0'; \
123 AILogger(SEV, AIToolbox::Impl::logBuffer); \
129 #define AI_LOGGER(SEV, ARGS) \
131 AIToolbox::Impl::FakeLogger(SEV) << ARGS; \