SurgSim::Graphics::OsgLog Class Reference

Enable logging of OSG through SurgSim Logging System To use this, an object of OsgLog class must be created. More...

`#include <SurgSim/Graphics/OsgLog.h>`

Inheritance diagram for SurgSim::Graphics::OsgLog:

## Public Member Functions

| OsgLog ()
| Constructor If OSS_DEBUG is defined, set OSG's log level to the lowest (osg::DEBUG_FP). More...
void | notify (osg::NotifySeverity severity, const char *message) override
| User defined derived log Method Based on log level 'severity', this method decides whether to log 'message' with OSS logging system. More...

## Private Attributes

std::shared_ptr< SurgSim::Framework::Logger > | m_logger

## Detailed Description

Enable logging of OSG through SurgSim Logging System To use this, an object of OsgLog class must be created.

Then call osg::setNotifyHandler() to let OSG use OSS logging system.

## Constructor & Destructor Documentation

## OsgLog()

SurgSim::Graphics::OsgLog::OsgLog | ( |  | ) |

Constructor If OSS_DEBUG is defined, set OSG's log level to the lowest (osg::DEBUG_FP).

So that all info can be logged. Otherwise, keep OSG's default log level (osg::NOTICE). Note that message can still be filtered out in user defined derived method notify().

## Member Function Documentation

## notify()

void SurgSim::Graphics::OsgLog::notify | ( | osg::NotifySeverity | severity,
|  | const char * | message
| ) |  |

override

User defined derived log Method Based on log level 'severity', this method decides whether to log 'message' with OSS logging system.

Parameters

  severity | Log level of message to be logged.
  message | The actual message to be logged.

## Member Data Documentation

## m_logger

std::shared_ptr<SurgSim::Framework::Logger> SurgSim::Graphics::OsgLog::m_logger

private

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

- SurgSim/Graphics/OsgLog.h
- SurgSim/Graphics/OsgLog.cpp