Go to the documentation of this file.
7 #ifndef INCLUDE_JET_LOGGING_H_
8 #define INCLUDE_JET_LOGGING_H_
50 mutable std::stringstream _buffer;
97 (Logger(LoggingLevel::Info) << Logging::getHeader(LoggingLevel::Info) \
98 << "[" << __FILE__ << ":" << __LINE__ << " (" << __func__ << ")] ")
100 (Logger(LoggingLevel::Warn) << Logging::getHeader(LoggingLevel::Warn) \
101 << "[" << __FILE__ << ":" << __LINE__ << " (" << __func__ << ")] ")
103 (Logger(LoggingLevel::Error) << Logging::getHeader(LoggingLevel::Error) \
104 << "[" << __FILE__ << ":" << __LINE__ << " (" << __func__ << ")] ")
106 (Logger(LoggingLevel::Debug) << Logging::getHeader(LoggingLevel::Debug) \
107 << "[" << __FILE__ << ":" << __LINE__ << " (" << __func__ << ")] ")
111 #endif // INCLUDE_JET_LOGGING_H_
Logger(LoggingLevel level)
Constructs a logger with logging level.
static void unmute()
Un-mutes the logger.
static void mute()
Mutes the logger.
static std::string getHeader(LoggingLevel level)
Returns the header string.
Logger infoLogger
Info-level logger.
Definition: advection_solver2.h:18
Logger errorLogger
Error-level logger.
static void setWarnStream(std::ostream *strm)
Sets the output stream for the warning level logs.
Super simple logger implementation.
Definition: logging.h:33
static void setLevel(LoggingLevel level)
Sets the logging level.
const Logger & operator<<(const T &x) const
Writes a value to the buffer stream.
Definition: logging.h:43
static void setAllStream(std::ostream *strm)
Sets the output stream for all the log levelss.
Logger warnLogger
Warn-level logger.
static void setErrorStream(std::ostream *strm)
Sets the output stream for the error level logs.
Helper class for logging.
Definition: logging.h:54
Logger debugLogger
Debug-level logger.
static void setDebugStream(std::ostream *strm)
Sets the output stream for the debug level logs.
static void setInfoStream(std::ostream *strm)
Sets the output stream for the info level logs.
LoggingLevel
Definition: logging.h:18