15 #define LOGERROR(MESSAGE) logger->append(loggererror, MESSAGE) 20 #define LOGINFO(MESSAGE) logger->append(loggerinfo, MESSAGE) 25 #if defined(DEBUG) || defined(_DEBUG) || !defined (NDEBUG) 26 #define LOGDEBUG(MESSAGE) logger->append(loggerdebug, MESSAGE) 28 #define LOGDEBUG(MESSAGE) 39 std::string intToStr(
const int number);
44 std::string floatToStr(
const float number);
51 loggerinfo, loggerdebug, loggererror
61 std::ostream *logStream;
70 Logger(std::ostream &stream);
85 void append(
const LogLevel level,
const std::string message)
const;
111 extern std::shared_ptr<small3d::Logger>
logger;
The standard logging class for small3d.
Definition: Logger.hpp:59
Logger(std::ostream &stream)
Constructor with stream for output.
Definition: Logger.cpp:30
std::shared_ptr< small3d::Logger > logger
The logger object used by the logging macros.
Definition: Logger.cpp:14
void initLogger()
Initialise the logger.
Definition: Logger.cpp:76
LogLevel
Possible logging levels.
Definition: Logger.hpp:50
void append(const LogLevel level, const std::string message) const
Appends a message to the logger.
Definition: Logger.cpp:40
~Logger()
Destructor.
Definition: Logger.cpp:34
void deleteLogger()
Destroy the logger.
Definition: Logger.cpp:84