SOFA API  e18b59ce
Open source framework for multi-physics simuation
sofa::helper::logging Namespace Reference

Namespaces

 countingmessagehandler
 
 loggingmessagehandler
 
 percomponentloggingmessagehandler
 
 routingmessagehandler
 

Classes

class  ClangMessageHandler
 
class  ClangStyleMessageFormatter
 
struct  ComponentInfo
 
class  ConsoleMessageHandler
 
class  DefaultStyleMessageFormatter
 
class  ExceptionMessageHandler
 
class  ExpectMessage
 
struct  FileInfo
 
struct  FileInfoOwningFilename
 To keep a trace (file,line) from where the message have been created. More...
 
class  FileMessageHandler
 
class  GtestMessageFrame
 
class  GtestMessageFrameFailure
 
class  GtestMessageFrameFailureWhenMissing
 
class  GtestMessageFrameIgnore
 
class  GtestMessageHandler
 
class  IgnoreMessage
 
class  LoggerMessageHandler
 
class  MainConsoleMessageHandler
 The MainConsoleMessageHandler class contains a singleton to ConsoleMessageHandler and offer static version of ConsoleMessageHandler API. More...
 
class  MainGtestMessageHandler
 
class  MainGtestMessageHandlerPrivate
 
class  Message
 
class  MessageAsTestFailure
 
class  MessageDispatcher
 
class  MessageDispatcherImpl
 
class  MessageFormatter
 
class  MessageHandler
 
class  RichConsoleStyleMessageFormatter
 The RichConsoleStyleMessageFormatter class. More...
 
class  SilentMessageHandler
 This class is a MessageHandler that simply do nothing with the message. More...
 
class  SofaComponentInfo
 

Typedefs

typedef boost::tokenizer< boost::char_separator< char > > tokenizer
 

Functions

void simpleFormat (size_t jsize, const std::string &text, size_t line_length, std::ostream &wrapped)
 simpleFormat a text containing our markdown 'tags' More...
 
bool notMuted (const sofa::core::objectmodel::Base *t)
 
bool notMuted (sofa::core::objectmodel::Base *t)
 
ComponentInfo::SPtr getComponentInfo (const sofa::core::objectmodel::Base *t)
 This construct a new ComponentInfo object from a Base object. More...
 
std::ostream & operator<< (std::ostream &out, const ComponentInfo &nfo)
 
std::ostream & operator<< (std::ostream &out, const ComponentInfo *nfo)
 
const ComponentInfo::SPtr getComponentInfo (const std::string &s)
 This function is used in the msg_* macro to handle emitting case based on string. More...
 
const ComponentInfo::SPtr getComponentInfo (const ComponentInfo::SPtr &s)
 This function is used in the msg_* macro to handle emitting case based on string. More...
 
bool notMuted (const ComponentInfo::SPtr &)
 
bool notMuted (const std::string &)
 This function is used in the msg_* macro to handle string based on string. More...
 
const SOFA_HELPER_API std::string toString (const Message::Type type)
 
std::ostream & operator<< (std::ostream &s, const Message &m)
 
std::vector< MessageHandler * > getDefaultMessageHandlers ()
 
MessageDispatcherImplgetMainInstance ()
 

Variables

const unsigned int messagequeuesize = 10000
 
map< int, Messages_m_messages
 
MessageDispatcherImpls_messagedispatcher = nullptr
 

Typedef Documentation

typedef boost::tokenizer<boost::char_separator<char> > sofa::helper::logging::tokenizer

Function Documentation

const ComponentInfo::SPtr sofa::helper::logging::getComponentInfo ( const std::string &  s)
inline

This function is used in the msg_* macro to handle emitting case based on string.

const ComponentInfo::SPtr sofa::helper::logging::getComponentInfo ( const ComponentInfo::SPtr s)
inline

This function is used in the msg_* macro to handle emitting case based on string.

ComponentInfo::SPtr sofa::helper::logging::getComponentInfo ( const sofa::core::objectmodel::Base t)
inline

This construct a new ComponentInfo object from a Base object.

std::vector<MessageHandler*> sofa::helper::logging::getDefaultMessageHandlers ( )

Threading issues... a mutex is serializing the access to the message API. Memory management: object are passed to the message info. some of them are duplicated other get a weak reference

MessageDispatcherImpl* sofa::helper::logging::getMainInstance ( )
bool sofa::helper::logging::notMuted ( const ComponentInfo::SPtr )
inline
bool sofa::helper::logging::notMuted ( const std::string &  )
inline

This function is used in the msg_* macro to handle string based on string.

bool sofa::helper::logging::notMuted ( const sofa::core::objectmodel::Base t)
inline
bool sofa::helper::logging::notMuted ( sofa::core::objectmodel::Base t)
inline
std::ostream& sofa::helper::logging::operator<< ( std::ostream &  out,
const ComponentInfo nfo 
)
std::ostream& sofa::helper::logging::operator<< ( std::ostream &  out,
const ComponentInfo nfo 
)
SOFA_HELPER_API std::ostream & sofa::helper::logging::operator<< ( std::ostream &  s,
const Message m 
)
void sofa::helper::logging::simpleFormat ( size_t  jsize,
const std::string &  text,
size_t  line_length,
std::ostream &  wrapped 
)

simpleFormat a text containing our markdown 'tags'

Parameters
jsizesize of the line prefix to fill with space (for left side alignment)
textthe text to format
line_lengthnumber of column to render to to
wrappedthe destination stream where to write the formatted text.
SOFA_HELPER_API const std::string sofa::helper::logging::toString ( const Message::Type  type)

Variable Documentation

const unsigned int sofa::helper::logging::messagequeuesize = 10000
map<int, Message> sofa::helper::logging::s_m_messages
MessageDispatcherImpl* sofa::helper::logging::s_messagedispatcher = nullptr