VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVortexDebug::LogHandler Class Reference

Detailed Description

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
 

Constructor & Destructor Documentation

◆ LogHandler()

makVre::DtVortexDebug::LogHandler::LogHandler ( )
default

Default constructor.

◆ ~LogHandler()

virtual makVre::DtVortexDebug::LogHandler::~LogHandler ( )
virtual

Destructor.

Resets the log handler if it wasn't already reset.

Member Function Documentation

◆ setLogHandler()

virtual void makVre::DtVortexDebug::LogHandler::setLogHandler ( )
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.

◆ resetLogHandler()

virtual void makVre::DtVortexDebug::LogHandler::resetLogHandler ( )
virtual

Restores the original Vortex log handler.

Returns control to the previous log handler that was active before this handler was installed.

◆ vortexLogHandler()

static void makVre::DtVortexDebug::LogHandler::vortexLogHandler ( Vx::eLogLevel level,
const char *const format,
va_list ap )
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.

Parameters
levelThe severity level of the log message
formatThe format string for the log message
apVariable argument list containing values for the format string

◆ formatToString()

static bool makVre::DtVortexDebug::LogHandler::formatToString ( std::string & str,
const char *const fmt,
va_list ap )
staticprotected

Helper function to format a log message with variable arguments.

Parameters
strString reference where the formatted output will be stored
fmtFormat string
apVariable argument list
Returns
True if formatting succeeded, false otherwise

Member Data Documentation

◆ myOldLongHandler

Vx::LogHandler makVre::DtVortexDebug::LogHandler::myOldLongHandler
protected

The previous log handler that was active.


The documentation for this class was generated from the following file: