|
enum | eLogType { eLogTypeNewFile = 0,
eLogTypeDefault,
eLogTypeUserDefine
} |
|
|
static PROUD_API CLogWriter * | New (const String &logFileName, unsigned int newFileForLineLimit=0, bool putFileTimeString=true) |
| Generate a new CLogWriter object.
|
|
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 |
Generate a new CLogWriter object.
TODO:translate needed.
- Parameters
-
logFileName | log file name. |
newFileForLineLimit | If the number of the log lines gets bigger than the designated value her, then it starts recording in a new log file. It is limitless if 0. |
putFileTimeString | If set as “true”, the current time information (year/month/date/hour/minute/second) is added to prevent duplication of file names. |
virtual void Proud::CLogWriter::SetFileName |
( |
const String & |
logFileName | ) |
|
|
pure virtual |
The log file is changed to another name. The file being recorded is closed and opens newly as a file changed to a different name.
- This function is executed asynchronously. In other words, it is returned immediately.
- If the log file fails to change to a different name, this function does not return the error. Instead, Proud.Exception exception will occur when the function to record the log is used.
- Parameters
-
logFileName | New log file name |
virtual void Proud::CLogWriter::SetIgnorePendedWriteOnExit |
( |
bool |
flag | ) |
|
|
pure virtual |
- This determines whether to output the rest of the logs not yet output when the object is terminated (ended) or ignore them.
- The default value is false.
- If set true, it terminates immediately even if there is a log not yet output.
- If set false, termination is delayed until not yet output logs are all output.
- Parameters
-
flag | Whether to use this option or not. |
virtual void Proud::CLogWriter::WriteLine |
( |
int |
logLevel, |
|
|
LogCategory |
logCategory, |
|
|
HostID |
logHostID, |
|
|
const String & |
logMessage, |
|
|
const String & |
logFunction = _PNT("") , |
|
|
int |
logLine = 0 |
|
) |
| |
|
pure virtual |
One line of the log is recorded in the file in the ProudNet format.
- This function is executed asynchronously. In other words, it is returned immediately.
- This function is finally output as the examples below. logWriteLineTime: logLevel / logCategory(logHostID): logMessage {logFunction(logLine)}
- Parameters
-
logLevel | Severity of the log content |
logCategory | What type of a log is this? |
logHostID | The host transmitting this log. |
logMessage | Log message |
logFunction | Name of the function that has called the log |
logLine | Line that has called the log |
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