jubilant-funicular
Static Public Member Functions | Static Private Attributes | List of all members
nta::Logger Class Reference

stores program information in internal and external logs More...

#include <Logger.h>

Collaboration diagram for nta::Logger:
Collaboration graph
[legend]

Static Public Member Functions

static void createLog ()
 creates the log
 
static void useSecondLog (std::ostream &stream)
 Sets a secondary stream for logging.
 
static void unuseSecondLog ()
 Stop using a secondary stream.
 
static void writeToLog (crstring entry)
 writes an entry in the log
 
template<typename... Args>
static void writeToLog (crstring entry, Args &&... args)
 
static Error writeErrorToLog (crstring error, ErrorType type=OTHER)
 writes entry in log and then notifies ErrorManager More...
 
template<typename... Args>
static Error writeErrorToLog (ErrorType type, crstring err, Args &&... args)
 
static void indent (size_t tab_size=TAB_SIZE)
 indents entries
 
static void unindent (size_t tab_size=TAB_SIZE)
 unindents entries
 

Static Private Attributes

static std::ofstream m_logFile
 the file that keeps the external log
 
static std::ostream * m_secondLog = nullptr
 Optional secondary stream to log data to as well.
 
static size_t m_tabs = 0
 
static const size_t TAB_SIZE = 4
 

Detailed Description

stores program information in internal and external logs

Definition at line 11 of file Logger.h.

Member Function Documentation

◆ writeErrorToLog()

Error nta::Logger::writeErrorToLog ( crstring  error,
ErrorType  type = OTHER 
)
static

writes entry in log and then notifies ErrorManager

Todo:
Make sure all the code that previously assumed this function always exits still behaves sensibly

Definition at line 31 of file Logger.cpp.

Referenced by nta::GLSLProgram::compileShader(), nta::Window::createWindow(), nta::AudioManager::getSoundEffect(), nta::ContextData::getTextureFile(), nta::GLSLProgram::getUniformLocation(), nta::init(), nta::AudioManager::init(), nta::GLSLProgram::linkShaders(), and nta::IOManager::readFileToBuffer().


The documentation for this class was generated from the following files: