#include <LoggingMessageHandler.h>
The LoggingMessageHandler class saves a copy of the messages in a buffer. More...

The LoggingMessageHandler class saves a copy of the messages in a buffer.
This class is a MessageHandler that can be added to in a MessageDispatcher. Once set the class can start copying the messages passing through the MessageDispatcher in a buffer.
Dedicated function allows to activate/deactivate the saving of the messages as well as to clear the content of the buffer. The class keeps tracks of its number of activation/deactivation. Message logging is activated as long as there is not a paired number of activation/deactivation.
User interested in having a singleton of this class should have a look at
You can also see the
Public Member Functions | |
| LoggingMessageHandler () | |
| ~LoggingMessageHandler () override | |
| void | reset () |
| size_t | activate () |
| size_t | deactivate () |
| const vector< Message > & | getMessages () const |
| void | process (Message &m) override |
| Inherited from MessageHandler. More... | |
| sofa::helper::logging::loggingmessagehandler::LoggingMessageHandler::LoggingMessageHandler | ( | ) |
|
inlineoverride |
| size_t sofa::helper::logging::loggingmessagehandler::LoggingMessageHandler::activate | ( | ) |
| size_t sofa::helper::logging::loggingmessagehandler::LoggingMessageHandler::deactivate | ( | ) |
| const vector< Message > & sofa::helper::logging::loggingmessagehandler::LoggingMessageHandler::getMessages | ( | ) | const |
|
overridevirtual |
Inherited from MessageHandler.
Implements sofa::helper::logging::MessageHandler.
| void sofa::helper::logging::loggingmessagehandler::LoggingMessageHandler::reset | ( | void | ) |