Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void MessageHandlerComponent::parse ( core::objectmodel::BaseObjectDescription*
const string stype(type) ;

if(stype=="sofa"){
MessageDispatcher::addHandler(new ConsoleMessageHandler()) ;
MessageDispatcher::addHandler(&sofa::helper::logging::MainConsoleMessageHandler::getInstance()) ;
}else if(stype=="clang"){
MessageDispatcher::addHandler(new ClangMessageHandler()) ;
}else if(stype=="rich"){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,9 @@ namespace sofa::helper::logging
/// some of them are duplicated
/// other get a weak reference

std::vector<MessageHandler*> getDefaultMessageHandlers(){
std::vector<MessageHandler*> messageHandlers;
static ConsoleMessageHandler s_consoleMessageHandler(&DefaultStyleMessageFormatter::getInstance());
messageHandlers.push_back(&s_consoleMessageHandler);
return messageHandlers;
std::vector<MessageHandler*> getDefaultMessageHandlers()
{
return { &sofa::helper::logging::MainConsoleMessageHandler::getInstance() };
}

class MessageDispatcherImpl
Expand Down
4 changes: 2 additions & 2 deletions applications/projects/runSofa/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ int main(int argc, char** argv)
if (messageHandler == "auto" )
{
MessageDispatcher::clearHandlers() ;
MessageDispatcher::addHandler( new ConsoleMessageHandler() ) ;
MessageDispatcher::addHandler( &sofa::helper::logging::MainConsoleMessageHandler::getInstance() ) ;
}
else if (messageHandler == "clang")
{
Expand All @@ -348,7 +348,7 @@ int main(int argc, char** argv)
else if (messageHandler == "sofa")
{
MessageDispatcher::clearHandlers() ;
MessageDispatcher::addHandler( new ConsoleMessageHandler() ) ;
MessageDispatcher::addHandler( &sofa::helper::logging::MainConsoleMessageHandler::getInstance() ) ;
}
else if (messageHandler == "rich")
{
Expand Down
Loading