11#ifndef CUBBYFLOW_LOGGER_HPP
12#define CUBBYFLOW_LOGGER_HPP
68 std::stringstream m_buffer{};
103#define CUBBYFLOW_INFO \
104 (Logger(LogLevel::Info) \
105 << Logging::GetHeader(LogLevel::Info) << "[" << __FILE__ << ":" \
106 << __LINE__ << " (" << __func__ << ")] ")
107#define CUBBYFLOW_WARN \
108 (Logger(LogLevel::Warn) \
109 << Logging::GetHeader(LogLevel::Warn) << "[" << __FILE__ << ":" \
110 << __LINE__ << " (" << __func__ << ")] ")
111#define CUBBYFLOW_ERROR \
112 (Logger(LogLevel::Error) \
113 << Logging::GetHeader(LogLevel::Error) << "[" << __FILE__ << ":" \
114 << __LINE__ << " (" << __func__ << ")] ")
115#define CUBBYFLOW_DEBUG \
116 (Logger(LogLevel::Debug) \
117 << Logging::GetHeader(LogLevel::Debug) << "[" << __FILE__ << ":" \
118 << __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:22
LogLevel
Definition Logging.hpp:22