It can often be useful to log text to the console, an in-game utility opened with the tilde key, or to a text file. The CRYENGINE console exposes this through the ILog interface.
Logging can be performed with the CryLog* functions, see the table further along.
Anything logged to console is also logged to file, based on the log_verbosity and log_writeToFileVerbosity console variable settings (also called CVars). The verbosity indicates which messages should be logged/displayed, and is very useful for filtering out messages:
Verbosity Level | Displayed with | Description |
---|---|---|
-1 | N/A | No logging |
0 | CryLogAlways (ILog::eAlways) | Suppresses all logged information, excluding anything logged using the CryLogAlways function. |
1 | The above, and ILog::eError | Logs the above and errors. |
2 | The above, and CryWarning (ILog::eWarning) | Logs the above and warnings. |
3 | The above, and CryLog (ILog::eMessage) | Logs the above and additional messages. |
4 | The above, and CryComment (ILog::eComment) | Logs the above and additional trivial comments. |
This concludes the article on logging, you may be interested in: