| Table of Contents | ||||||||||||
|
|
||||||||||||
| LogItem | ||||||||||||
|
Purpose Makes an entry into the log |
||||||||||||
|
Protoype void CError::LogItem (string str_log_item, char* c_origin, int i_line, string str_type) |
||||||||||||
|
Parameters
|
||||||||||||
|
Description This function actually inserts an error or report item into the log file. The text that will appear to explain the error or report will be passed in for str_log_item. The next two parameters, c_origin and i_line can be taken care of with the predefined compiler values of __FILE__ and __LINE__ respectively. The type of error for str_type can be one of the following:
Each of the types with [SYS][APP] means that one or the other of the two can be appended to the error type. This lets you distinguish system errors (errors that deal with the game framework) and application errors (errors that deal with the game code). Why are there so many error types? See SetFilter() for more information. Also, when a log item is reported the function also logs the exact time in hour:min:sec:ms below the log entry. This is not elapsed time. |
||||||||||||
|
Use CError error; error.LogItem("Completed loading all game objects", __FILE__, __LINE__, ERR_OK_APP);
|
||||||||||||
|
|
||||||||||||
|