SOFA API  1c8b807d
Open source framework for multi-physics simuation
sofa::helper::logging::FileMessageHandler Class Reference

#include <FileMessageHandler.h>

Inheritance diagram for sofa::helper::logging::FileMessageHandler:

Detailed Description

A message handle that saves the content message passing by in a file. The formatting can be customize by passing a different MessageFormatter in the constructor. Example of use: MessageDispatcher::addHandler(new FileMessageHandler("myfile.log"));

Public Member Functions

 FileMessageHandler (const char *filename, MessageFormatter *formatter=nullptr)
 
 ~FileMessageHandler () override
 
void process (Message &m) override
 
bool isValid ()
 
- Public Member Functions inherited from sofa::helper::logging::MessageHandler
virtual ~MessageHandler ()
 

Constructor details

◆ FileMessageHandler()

sofa::helper::logging::FileMessageHandler::FileMessageHandler ( const char filename,
MessageFormatter formatter = nullptr 
)

◆ ~FileMessageHandler()

sofa::helper::logging::FileMessageHandler::~FileMessageHandler ( )
override

Function details

◆ isValid()

bool sofa::helper::logging::FileMessageHandler::isValid ( )

◆ process()

void sofa::helper::logging::FileMessageHandler::process ( Message m)
overridevirtual