For general purpose logging, this is the logger! It is a singleton class. More...
#include <Logger.hpp>
Collaboration diagram for BARE2D::Logger:Public Member Functions | |
| void | log (std::string message, bool important=false) |
| Logs a message to a file and the terminal. More... | |
Static Public Member Functions | |
| static Logger * | getInstance () |
Private Member Functions | |
| Logger () | |
| ~Logger () | |
Private Attributes | |
| std::ofstream | m_logFile |
Static Private Attributes | |
| static Logger * | m_instance = nullptr |
For general purpose logging, this is the logger! It is a singleton class.
Definition at line 12 of file Logger.hpp.
|
private |
Definition at line 11 of file Logger.cpp.
References BARE2D::LOGGER_FAILURE, m_logFile, and BARE2D::throwFatalError().
Referenced by getInstance().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
|
static |
Definition at line 34 of file Logger.cpp.
References Logger(), and m_instance.
Referenced by BARE2D::ResourceManager::clearCaches(), BARE2D::XMLDataManager::getDataCache(), BARE2D::XMLDataManager::loadXML(), MessageCallback(), BARE2D::LuaFunctions::print(), BARE2D::XMLData::read(), BARE2D::IOManager::readFileToBuffer(), BARE2D::XMLDataManager::readXMLData(), BARE2D::XMLDataManager::saveXML(), BARE2D::BARECEGUI::setActiveContext(), and BARE2D::XMLDataManager::writeXMLData().
Here is the call graph for this function:
Here is the caller graph for this function:| void BARE2D::Logger::log | ( | std::string | message, |
| bool | important = false |
||
| ) |
Logs a message to a file and the terminal.
| message | The message to log |
| important | If this is set to true, the message will be surrounded with hashes. This implies importance! |
| important | = false |
Definition at line 42 of file Logger.cpp.
References m_logFile.
Referenced by BARE2D::ResourceManager::clearCaches(), BARE2D::XMLDataManager::getDataCache(), BARE2D::XMLDataManager::loadXML(), MessageCallback(), BARE2D::LuaFunctions::print(), BARE2D::XMLData::read(), BARE2D::IOManager::readFileToBuffer(), BARE2D::XMLDataManager::readXMLData(), BARE2D::XMLDataManager::saveXML(), BARE2D::BARECEGUI::setActiveContext(), and BARE2D::XMLDataManager::writeXMLData().
Here is the caller graph for this function:
|
staticprivate |
Definition at line 31 of file Logger.hpp.
Referenced by getInstance().
|
private |
Definition at line 29 of file Logger.hpp.