The small3d framework
Classes | Macros | Enumerations | Functions | Variables
Logger.hpp File Reference

Header of the Logger class. More...

#include <ostream>
#include <memory>

Go to the source code of this file.

Classes

class  small3d::Logger
 The standard logging class for small3d. More...
 

Macros

#define LOGERROR(MESSAGE)   logger->append(loggererror, MESSAGE)
 
#define LOGINFO(MESSAGE)   logger->append(loggerinfo, MESSAGE)
 
#define LOGDEBUG(MESSAGE)   logger->append(loggerdebug, MESSAGE)
 

Enumerations

enum  small3d::LogLevel { loggerinfo, loggerdebug, loggererror }
 Possible logging levels.
 

Functions

std::string small3d::intToStr (const int number)
 
std::string small3d::floatToStr (const float number)
 
void small3d::initLogger ()
 Initialise the logger.
 
void small3d::deleteLogger ()
 Destroy the logger.
 

Variables

std::shared_ptr< small3d::Logger > logger
 The logger object used by the logging macros.
 

Detailed Description

Header of the Logger class.

Created on: 2014/10/18 Author: Dimitri Kourkoulis License: BSD 3-Clause License (see LICENSE file)

Macro Definition Documentation

◆ LOGDEBUG

#define LOGDEBUG (   MESSAGE)    logger->append(loggerdebug, MESSAGE)

Log debug information (only shows up when debugging)

◆ LOGERROR

#define LOGERROR (   MESSAGE)    logger->append(loggererror, MESSAGE)

Log an error

◆ LOGINFO

#define LOGINFO (   MESSAGE)    logger->append(loggerinfo, MESSAGE)

Log information (shows up even when not debugging)

Function Documentation

◆ floatToStr()

std::string small3d::floatToStr ( const float  number)

Convert a float to a string.

◆ intToStr()

std::string small3d::intToStr ( const int  number)

Convert an integer to a string.