LibCT 2.0
Public Member Functions | Static Public Member Functions | Private Attributes

LibCT::Logger Class Reference

A logger to allow the code to log messages. More...

#include <Logger.h>

List of all members.

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 LoggerInstance ()

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.

Detailed Description

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.


Constructor & Destructor Documentation

LibCT::Logger::Logger ( )

Constructor.

LibCT::Logger::~Logger ( )

Destructor.


Member Function Documentation

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

Returns:
The instance to this singleton
void LibCT::Logger::Log ( LogLevel  level,
const char *  pMessage 
)

Log a message.

Parameters:
levelLevel indicating the severity of the message
pMessageThe message to be logged

Member Data Documentation

std::ofstream LibCT::Logger::m_File [private]

The filestream accosiated with the logging file.

Flag to test if Initialise has been called (otherwise m_File is invalid)


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