| Table of Contents | ||||
|
|
||||
| SetFilter | ||||
|
Purpose Sets the filter that determines what error types not to display in the log |
||||
|
Protoype void CError::SetFilter (filter v_filter_type = filter(), filter v_filter_file = filter()) |
||||
|
Parameters
|
||||
|
Description The reason there are so many different error types listed in LogItem() is so you can better categorize errors to filter them out of a log. The function takes an array of error types (in the form of an STL vector) and uses that to create the filter list. When an error type is on the filter list, any and all errors of that type reported with LogItem() will be ignored and not logged. If you want to clear all types from the filter, pass in an empty parameter set. If you want to remove an error type, you must pass in the entire list minus the type you now want displayed in the log. In addition, you can also specify which files you don't want any reports logged from. You must include the full file name plus extension, like for instance: "cspritemngr.cpp". Full path info is not required. This function is not intended for real-time use (constant in-game changing of filters) and it's really better to use LoadConfig() instead.
|
||||
|
Use CError error; // build filter filter v_filter; filter.push_back(ERR_DEBUG); filter.push_back(ERR_COMMON_SYS); filter.push_back(ERR_COMMON_APP); // create the filter error.SetFilter(v_filter); // clear the filter error.SetFilter(); |
||||
|
|
||||
|