Proud::CLogWriter Class Referenceabstract

Public Types

enum  eLogType { eLogTypeNewFile = 0, eLogTypeDefault, eLogTypeUserDefine }
 

Public Member Functions

virtual void SetFileName (const String &logFileName)=0
 
virtual void WriteLine (int logLevel, LogCategory logCategory, HostID logHostID, const String &logMessage, const String &logFunction=_PNT(""), int logLine=0)=0
 
virtual void WriteLine (const String &logMessage)=0
 
virtual void SetIgnorePendedWriteOnExit (bool flag)=0
 

Static Public Member Functions

static PROUD_API CLogWriterNew (const String &logFileName, unsigned int newFileForLineLimit=0, bool putFileTimeString=true)
 

Detailed Description

Module that records log to a file (Refer Making a PIDL file )

General usage

  • Use CLogWriter.New to create this object. Designates log file name when created.
  • Use WriteLine, WriteLine to record log. Saved log is saved in file as asynchronous.

Member Function Documentation

static PROUD_API CLogWriter* Proud::CLogWriter::New ( const String logFileName,
unsigned int  newFileForLineLimit = 0,
bool  putFileTimeString = true 
)
static

TODO:translate needed.

virtual void Proud::CLogWriter::SetFileName ( const String logFileName)
pure virtual

Replaces log file name to other name. The file that was being recorded is closed and opened with a new file name.

  • This function is asynchronous so returned immediately.
  • If renaming fails then error will not be returned. Instead, when using the function that records the log will cause 'Proud.Exception' exception.
    Parameters
    logFileNamenew log file name
virtual void Proud::CLogWriter::SetIgnorePendedWriteOnExit ( bool  flag)
pure virtual

TODO:translate needed.

virtual void Proud::CLogWriter::WriteLine ( const String logMessage)
pure virtual

Writes a line of log to the file

  • This function is asynchronous so returned immediately.
  • But not like void WriteLine(TraceID TID, LPCWSTR text), does not have any header.
    Parameters
    logMessagetext string to record log.
  • You are able to use string type or WriteLine(String::NewFormat(L"Test Log %d", 10)) type