|
enum | eLogType { eLogTypeNewFile = 0,
eLogTypeDefault,
eLogTypeUserDefine
} |
|
|
static PROUD_API CLogWriter * | New (const String &logFileName, unsigned int newFileForLineLimit=0, bool putFileTimeString=true) |
|
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.
static PROUD_API CLogWriter* Proud::CLogWriter::New |
( |
const String & |
logFileName, |
|
|
unsigned int |
newFileForLineLimit = 0 , |
|
|
bool |
putFileTimeString = true |
|
) |
| |
|
static |
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
-
logFileName | new log file name |
virtual void Proud::CLogWriter::SetIgnorePendedWriteOnExit |
( |
bool |
flag | ) |
|
|
pure virtual |
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
-
logMessage | text string to record log. |
- You are able to use string type or WriteLine(String::NewFormat(L"Test Log %d", 10)) type