11 #ifndef CUBBYFLOW_LOGGER_HPP 12 #define CUBBYFLOW_LOGGER_HPP 67 mutable std::stringstream m_buffer{};
75 static void SetInfoStream(std::ostream* stream);
78 static void SetWarnStream(std::ostream* stream);
81 static void SetErrorStream(std::ostream* stream);
84 static void SetDebugStream(std::ostream* stream);
87 static void SetAllStream(std::ostream* stream);
90 static std::string GetHeader(
LogLevel level);
93 static void SetLevel(
LogLevel level);
114 #define CUBBYFLOW_INFO \ 115 (Logger(LogLevel::Info) \ 116 << Logging::GetHeader(LogLevel::Info) << "[" << __FILE__ << ":" \ 117 << __LINE__ << " (" << __func__ << ")] ") 118 #define CUBBYFLOW_WARN \ 119 (Logger(LogLevel::Warn) \ 120 << Logging::GetHeader(LogLevel::Warn) << "[" << __FILE__ << ":" \ 121 << __LINE__ << " (" << __func__ << ")] ") 122 #define CUBBYFLOW_ERROR \ 123 (Logger(LogLevel::Error) \ 124 << Logging::GetHeader(LogLevel::Error) << "[" << __FILE__ << ":" \ 125 << __LINE__ << " (" << __func__ << ")] ") 126 #define CUBBYFLOW_DEBUG \ 127 (Logger(LogLevel::Debug) \ 128 << Logging::GetHeader(LogLevel::Debug) << "[" << __FILE__ << ":" \ 129 << __LINE__ << " (" << __func__ << ")] ") Logger errorLogger
Error-level logger.
Super simple logger implementation.
Definition: Logging.hpp:36
Helper class for logging.
Definition: Logging.hpp:71
Logger warnLogger
Warn-level logger.
Definition: pybind11Utils.hpp:20
const Logger & operator<<(const T &x) const
Writes a value to the buffer stream.
Definition: Logging.hpp:59
Logger infoLogger
Info-level logger.
LogLevel
Definition: Logging.hpp:20
Logger debugLogger
Debug-level logger.