9 #ifndef CUBBYFLOW_LOGGER_H 10 #define CUBBYFLOW_LOGGER_H 53 mutable std::stringstream m_buffer;
100 #define CUBBYFLOW_INFO \ 101 (Logger(LogLevel::Info) << Logging::GetHeader(LogLevel::Info) \ 102 << "[" << __FILE__ << ":" << __LINE__ << " (" << __func__ << ")] ") 103 #define CUBBYFLOW_WARN \ 104 (Logger(LogLevel::Warn) << Logging::GetHeader(LogLevel::Warn) \ 105 << "[" << __FILE__ << ":" << __LINE__ << " (" << __func__ << ")] ") 106 #define CUBBYFLOW_ERROR \ 107 (Logger(LogLevel::Error) << Logging::GetHeader(LogLevel::Error) \ 108 << "[" << __FILE__ << ":" << __LINE__ << " (" << __func__ << ")] ") 109 #define CUBBYFLOW_DEBUG \ 110 (Logger(LogLevel::Debug) << Logging::GetHeader(LogLevel::Debug) \ 111 << "[" << __FILE__ << ":" << __LINE__ << " (" << __func__ << ")] ") static void SetInfoStream(std::ostream *stream)
Sets the output stream for the info level logs.
Logger errorLogger
Error-level logger.
Super simple logger implementation.
Definition: Logging.h:34
Logger(LogLevel level)
Constructs a logger with logging level.
Helper class for logging.
Definition: Logging.h:57
Logger warnLogger
Warn-level logger.
static void SetLevel(LogLevel level)
Sets the log level.
static void Unmute()
Un-mutes the logger.
Definition: pybind11Utils.h:24
const Logger & operator<<(const T &x) const
Writes a value to the buffer stream.
Definition: Logging.h:45
static void Mute()
Mutes the logger.
static void SetWarnStream(std::ostream *stream)
Sets the output stream for the warning level logs.
static void SetDebugStream(std::ostream *stream)
Sets the output stream for the debug level logs.
Logger infoLogger
Info-level logger.
LogLevel
Definition: Logging.h:18
static void SetErrorStream(std::ostream *stream)
Sets the output stream for the error level logs.
static std::string GetHeader(LogLevel level)
Returns the header string.
static void SetAllStream(std::ostream *stream)
Sets the output stream for all the log levels.
Logger debugLogger
Debug-level logger.