iMSTK
Interactive Medical Simulation Toolkit
Public Member Functions | Static Public Member Functions | List of all members
imstk::LoggerSynchronous Class Reference

Public Member Functions

 LoggerSynchronous (std::shared_ptr< LogOutput > output)
 
 ~LoggerSynchronous ()=default
 Destructor.
 
bool writeMessage (const std::string &message)
 
int getThreshold () const
 
void setThreshold (int val)
 
std::shared_ptr< LogOutputgetOutput () const
 
std::shared_ptr< CacheOutputgetCacheOutput () const
 
void setOutput (std::shared_ptr< LogOutput > val)
 
std::string getName ()
 

Static Public Member Functions

static std::shared_ptr< LoggerSynchronousinstance ()
 
static void startLogger ()
 For compatibility.
 

Detailed Description

Definition at line 137 of file imstkLoggerSynchronous.h.

Constructor & Destructor Documentation

◆ LoggerSynchronous()

imstk::LoggerSynchronous::LoggerSynchronous ( std::shared_ptr< LogOutput output)
inline

Constructor.

Parameters
outputThe LogOutput instance used to display or log the data.

Definition at line 142 of file imstkLoggerSynchronous.h.

Member Function Documentation

◆ getCacheOutput()

std::shared_ptr<CacheOutput> imstk::LoggerSynchronous::getCacheOutput ( ) const
inline

TODO HS-2022-06-03 There is some issue in Unity where the cast to CacheOutput isn't working, this is a patch to get around that

Definition at line 190 of file imstkLoggerSynchronous.h.

◆ getOutput()

std::shared_ptr<LogOutput> imstk::LoggerSynchronous::getOutput ( ) const
inline

Gets the output object used by this logger.

Returns
The current output object used this logger.

Definition at line 183 of file imstkLoggerSynchronous.h.

◆ getThreshold()

int imstk::LoggerSynchronous::getThreshold ( ) const
inline

Gets the logging threshold. Anything message with less than this level will be ignored.

Returns
The threshold value.

Definition at line 168 of file imstkLoggerSynchronous.h.

◆ setOutput()

void imstk::LoggerSynchronous::setOutput ( std::shared_ptr< LogOutput val)
inline

Sets the output object used by this logger.

Parameters
valThe output object to be used.

Definition at line 197 of file imstkLoggerSynchronous.h.

◆ setThreshold()

void imstk::LoggerSynchronous::setThreshold ( int  val)
inline

Sets the logging threshold. Anything message with less than this level will be ignored.

Parameters
valThe value to be used as the threshold.

Definition at line 176 of file imstkLoggerSynchronous.h.

◆ writeMessage()

bool imstk::LoggerSynchronous::writeMessage ( const std::string &  message)
inline

Uses the contained instance of LogOutput to write the log message

Returns
true on success
Parameters
messagethe message to be printed

Definition at line 160 of file imstkLoggerSynchronous.h.


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