NLS Engine  v0.1
The Next Logical Step in game engine design.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines
Public Member Functions | Static Public Member Functions | Static Public Attributes
EventLogger Class Reference

List of all members.

Public Member Functions

bool PrintToFile (unsigned int entryPriorityLevel, std::string text, char const *file="NOFILE.cpp", int line=0, char const *func="void()")
 Print the message to the file, with enough information to determine source.
bool LogToDisk (const LOG_PRIORITY::TYPE &, const std::string &, const std::string &="<NO FILE>", const unsigned int &=0, const std::string &="<NO FUNCTION>")
 Log the message to disk, with enough information to determine source.
bool SetLogFile (const std::string &)
 Specify a log file for all logging writes to be sent to.

Static Public Member Functions

static void SetEventLogger (EventLogger *)
 Static member function.
static EventLoggerGetEventLogger ()
 Static member function. Acts as combination factory and getter of the singleton.

Static Public Attributes

static std::string module

Detailed Description

Definition at line 65 of file EventLogger.h.


Member Function Documentation

Static member function. Acts as combination factory and getter of the singleton.

Definition at line 50 of file EventLogger.cpp.

bool EventLogger::LogToDisk ( const LOG_PRIORITY::TYPE priority_level,
const std::string &  text,
const std::string &  file = "<NO FILE>",
const unsigned int &  line = 0,
const std::string &  func = "<NO FUNCTION>" 
)

Log the message to disk, with enough information to determine source.

Definition at line 59 of file EventLogger.cpp.

bool EventLogger::PrintToFile ( unsigned int  entryPriorityLevel,
std::string  text,
char const *  file = "NOFILE.cpp",
int  line = 0,
char const *  func = "void()" 
) [inline]

Print the message to the file, with enough information to determine source.

This uses an integer which could be a source of out-of-bounds array reads. Instead, use the LogToDisk method.

Definition at line 78 of file EventLogger.h.

void EventLogger::SetEventLogger ( EventLogger elog) [static]

Static member function.

Allows each compilation unit to set their unique glogger, but keeps the singleton pattern enforced within each unit. Combined with the compilation units (the dynamic libraries) being passed an instance of the EventLogger, as created in main(), this creates a cross-compilation singleton.

Definition at line 43 of file EventLogger.cpp.

bool EventLogger::SetLogFile ( const std::string &  file)

Specify a log file for all logging writes to be sent to.

Definition at line 115 of file EventLogger.cpp.


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