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
82 void append(
const LogLevel level,
const std::string message)
const;
99 extern std::shared_ptr<small3d::Logger>
logger;
The standard logging class for small3d.
Definition: Logger.hpp:59
std::shared_ptr< small3d::Logger > logger
The logger object used by the logging macros.
Definition: Logger.cpp:18
void initLogger()
Initialise the logger.
Definition: Logger.cpp:103
Logger()
Constructor with stream for output.
Definition: Logger.cpp:34
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:42
~Logger()
Destructor.
Definition: Logger.cpp:38
void deleteLogger()
Destroy the logger.
Definition: Logger.cpp:107