wUtil::CLog Class Reference

CLog Provides basic logging functionality. More...

#include <wutil_log.h>

Public Types

Public Member Functions

Protected Attributes

Data Structures


Detailed Description

CLog Provides basic logging functionality.

Definition at line 39 of file wutil_log.h.


Member Function Documentation

void wUtil::CLog::AddLogEntry ( const std::wstring &  sMessage,
unsigned int  iSeverity,
time_t  TimeStamp 
) [inline]

Add a log entry

Parameters:
sMessage A text string with the log message
iSeverity An arbitrary severity indicator, where lower numbers are considered more severe (1 is the most severe)
TimeStamp The time that the log entry corresponds to

Definition at line 63 of file wutil_log.h.

References m_LogList.

Referenced by AddLogEntry(), wGui::CApplication::CApplication(), wGui::CView::CView(), wGui::CApplication::Exec(), wGui::CApplication::GetFontEngine(), wGui::CApplication::Init(), wGui::CWindow::RegisterChildWindow(), wGui::CMessageServer::RegisterMessageClient(), wGui::CWindow::SetWindowRect(), and wGui::CApplication::~CApplication().

void wUtil::CLog::AddLogEntry ( const std::wstring &  sMessage,
unsigned int  iSeverity = 5 
) [inline]

Add a log entry with the timestamp set to the current time

Parameters:
sMessage A text string with the log message
iSeverity An arbitrary severity indicator, where lower numbers are considered more severe (1 is the most severe), defaults to 5

Definition at line 69 of file wutil_log.h.

References AddLogEntry().

CLog::t_LogList wUtil::CLog::GetLogEntries ( unsigned int  iSeverity = 0  )  const

Get a list of the log entries

Parameters:
iSeverity If this is zero, all log entries will be returned, otherwise it will only return log entries with the specified severity (defaults to 0)
Returns:
A list of the log entries

Definition at line 33 of file wutil_log.cpp.

References m_LogList.

CLog::t_LogList wUtil::CLog::GetLogEntries ( unsigned int  iHighSeverity,
unsigned int  iLowSeverity 
) const

Get a list of the log entries that fit a severity range

Parameters:
iHighSeverity The high end of the severity range (lower number)
iLowSeverity The low end of the severity range (higher number)
Returns:
A list of the log entries

Definition at line 47 of file wutil_log.cpp.

References m_LogList.

void wUtil::CLog::WriteToFile ( const std::wstring &  sFilename,
bool  bAppend = true,
const std::wstring &  sLogHeader = L"" 
) const

Write the log to a file

Parameters:
sFilename The file to write the log to
bAppend Indicates if the log should be appended, or overwrite the file (deaults to true)
sLogHeader A string that will be output to the beginning of the log file (defaults to "")

Definition at line 61 of file wutil_log.cpp.

References m_LogList, and stdex::ToMbString().

Referenced by wGui::CApplication::~CApplication().


The documentation for this class was generated from the following files:
Generated on Wed May 16 23:11:28 2007 for wGui by  doxygen 1.5.1