|
VR-Engage
2.2
|
Intercepts log messages from the Vortex physics engine and redirects them to the VR-Forces logging system, applying proper formatting and log level translation.
#include <vortexDebug.h>
Public Member Functions | |
| LogHandler ()=default | |
| virtual | ~LogHandler () |
| virtual void | setLogHandler () |
| virtual void | resetLogHandler () |
Static Protected Member Functions | |
| static void | vortexLogHandler (Vx::eLogLevel level, const char *const format, va_list ap) |
| static bool | formatToString (std::string &str, const char *const fmt, va_list ap) |
Protected Attributes | |
| Vx::LogHandler | myOldLongHandler |
|
default |
Default constructor.
|
virtual |
Destructor.
Resets the log handler if it wasn't already reset.
|
virtual |
Sets this handler as the active Vortex log handler.
Stores the previous log handler and installs this handler as the new Vortex log handler.
|
virtual |
Restores the original Vortex log handler.
Returns control to the previous log handler that was active before this handler was installed.
|
staticprotected |
Static callback function registered with Vortex.
This function is called by Vortex when log messages are generated. It formats the message and forwards it to the appropriate VR-Forces log.
| level | The severity level of the log message |
| format | The format string for the log message |
| ap | Variable argument list containing values for the format string |
|
staticprotected |
Helper function to format a log message with variable arguments.
| str | String reference where the formatted output will be stored |
| fmt | Format string |
| ap | Variable argument list |
|
protected |
The previous log handler that was active.