11#ifndef CUBBYFLOW_LOGGER_HPP
12#define CUBBYFLOW_LOGGER_HPP
68 mutable std::stringstream m_buffer{};
115#define CUBBYFLOW_INFO \
116 (Logger(LogLevel::Info) \
117 << Logging::GetHeader(LogLevel::Info) << "[" << __FILE__ << ":" \
118 << __LINE__ << " (" << __func__ << ")] ")
119#define CUBBYFLOW_WARN \
120 (Logger(LogLevel::Warn) \
121 << Logging::GetHeader(LogLevel::Warn) << "[" << __FILE__ << ":" \
122 << __LINE__ << " (" << __func__ << ")] ")
123#define CUBBYFLOW_ERROR \
124 (Logger(LogLevel::Error) \
125 << Logging::GetHeader(LogLevel::Error) << "[" << __FILE__ << ":" \
126 << __LINE__ << " (" << __func__ << ")] ")
127#define CUBBYFLOW_DEBUG \
128 (Logger(LogLevel::Debug) \
129 << Logging::GetHeader(LogLevel::Debug) << "[" << __FILE__ << ":" \
130 << __LINE__ << " (" << __func__ << ")] ")
Super simple logger implementation.
Definition Logging.hpp:38
Logger(Logger &&) noexcept=delete
Deleted move constructor.
Logger(const Logger &)=delete
Deleted copy constructor.
Logger(LogLevel level)
Constructs a logger with logging level.
Helper class for logging.
Definition Logging.hpp:73
static void Mute()
Mutes the logger.
static void SetInfoStream(std::ostream *stream)
Sets the output stream for the info level logs.
static void SetErrorStream(std::ostream *stream)
Sets the output stream for the error level logs.
static void SetDebugStream(std::ostream *stream)
Sets the output stream for the debug level logs.
static void SetAllStream(std::ostream *stream)
Sets the output stream for all the log levels.
static std::string GetHeader(LogLevel level)
Returns the header string.
static void Unmute()
Un-mutes the logger.
static void SetLevel(LogLevel level)
Sets the log level.
static void SetWarnStream(std::ostream *stream)
Sets the output stream for the warning level logs.
Definition pybind11Utils.hpp:21
LogLevel
Definition Logging.hpp:22
Logger errorLogger
Error-level logger.
Logger infoLogger
Info-level logger.
Logger debugLogger
Debug-level logger.
Logger warnLogger
Warn-level logger.