void mitk::LoggingBackend::ProcessMessage(const mbilog::LogMessage &l) { logMutex.Lock(); #ifdef _WIN32 FormatSmart(l, (int)GetCurrentThreadId()); #else FormatSmart(l); #endif if (logFile) { #ifdef _WIN32 FormatFull(*logFile, l, (int)GetCurrentThreadId()); #else FormatFull(*logFile, l); #endif } if (logOutputWindow) { if (outputWindow == nullptr) { outputWindow = new std::stringstream(); } outputWindow->str(""); outputWindow->clear(); #ifdef _WIN32 FormatFull(*outputWindow, l, (int)GetCurrentThreadId()); #else FormatFull(*outputWindow, l); #endif itk::OutputWindow::GetInstance()->DisplayText(outputWindow->str().c_str()); } logMutex.Unlock(); }
void mbilog::BackendCout::ProcessMessage(const mbilog::LogMessage& l) { if(m_useFullOutput) FormatFull(l); else FormatSmart(l); }