All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for SurgSim::Graphics::OsgLog:
Collaboration graph
[legend]

Public Member Functions

 OsgLog ()
 Constructor If OSS_DEBUG is defined, set OSG's log level to the lowest (osg::DEBUG_FP). More...
 
virtual 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

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

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

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

Parameters
severityLog level of message to be logged.
messageThe actual message to be logged.

Member Data Documentation

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

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