xmscore
1.0
|
#include <XmLog.h>
Classes | |
class | Impl |
implementation of XmLog More... | |
Public Member Functions | |
~XmLog () | |
destructor | |
void | Log (const char *const a_file, int a_line, xmlog::MessageTypeEnum a_level, std::string a_message) |
Logs. More... | |
int | ErrCount () |
Returns the current count of the error stack. More... | |
MessageStack | GetAndClearStack () |
Returns a copy of the error stack before clearing it. More... | |
std::string | GetAndClearStackStr () |
Clears the error stack and returns its contents as a string. More... | |
Static Public Member Functions | |
static XmLogFilenameCallback & | LogFilenameCallback () |
Set the callback that returns the log filename. More... | |
static std::string | LogFilename () |
Return the name of the log file. More... | |
Static Public Member Functions inherited from xms::Singleton< XmLog > | |
static XmLog & | Instance (bool a_delete=false, XmLog *a_new=NULL) |
Get the instance of the singleton. More... | |
static void | Delete () |
Delete the singleton instance. | |
Private Member Functions | |
XmLog () | |
Constructor hidden and not implemented. More... | |
Private Attributes | |
friend | Singleton< XmLog > |
Allow Singleton access to private members. | |
boost::scoped_ptr< Impl > | m |
Implementation pointer. | |
|
private |
Constructor hidden and not implemented.
constructor
Definition at line 139 of file XmLog.cpp.
References LogFilename().
int xms::XmLog::ErrCount | ( | ) |
MessageStack xms::XmLog::GetAndClearStack | ( | ) |
std::string xms::XmLog::GetAndClearStackStr | ( | ) |
Clears the error stack and returns its contents as a string.
Definition at line 228 of file XmLog.cpp.
References m.
Referenced by xms::ttAssertStackedErrors().
void xms::XmLog::Log | ( | const char *const | a_file, |
int | a_line, | ||
xmlog::MessageTypeEnum | a_level, | ||
std::string | a_message | ||
) |
Logs.
a_file | Source file name |
a_line | line number in source file name |
a_level | Lowest Severity level of the logged item |
a_message | Message to log |
Definition at line 190 of file XmLog.cpp.
References xmlog::debug, m, and XM_LOG.
|
static |
Return the name of the log file.
Static because the XmLog constructor needs it, so we must set LogFilenameCallback BEFORE we construct the XmLog singleton.
Definition at line 262 of file XmLog.cpp.
References LogFilenameCallback().
Referenced by xms::iTest_XM_LOG_debug(), xms::iTest_XM_LOG_stackable(), and XmLog().
|
static |
Set the callback that returns the log filename.
Static because the XmLog constructor needs it, so we must set it BEFORE we construct the XmLog singleton.
Definition at line 251 of file XmLog.cpp.
Referenced by LogFilename().