LibCT 2.0
|
A logger to allow the code to log messages. More...
#include <Logger.h>
Public Member Functions | |
Logger () | |
Constructor. | |
~Logger () | |
Destructor. | |
void | Initialise () |
Create/open the logging file. | |
void | Destroy () |
Close the logging file. | |
void | Log (LogLevel level, const char *pMessage) |
Log a message. | |
Static Public Member Functions | |
static Logger * | Instance () |
Private Attributes | |
bool | m_Initialised |
Flag to test if Initialise has been called (otherwise m_File is invalid) | |
std::ofstream | m_File |
The filestream accosiated with the logging file. |
A logger to allow the code to log messages.
Messages being logged have varying severity levels, by default only Critical and Warning messages are actually logged.
LibCT::Logger::Logger | ( | ) |
Constructor.
LibCT::Logger::~Logger | ( | ) |
Destructor.
void LibCT::Logger::Destroy | ( | ) |
Close the logging file.
void LibCT::Logger::Initialise | ( | ) |
Create/open the logging file.
static Logger* LibCT::Logger::Instance | ( | ) | [inline, static] |
Get an instance to this singleton
void LibCT::Logger::Log | ( | LogLevel | level, |
const char * | pMessage | ||
) |
Log a message.
level | Level indicating the severity of the message |
pMessage | The message to be logged |
std::ofstream LibCT::Logger::m_File [private] |
The filestream accosiated with the logging file.
bool LibCT::Logger::m_Initialised [private] |
Flag to test if Initialise has been called (otherwise m_File is invalid)