| 2627 | } |
| 2628 | |
| 2629 | void Writer::triggerDispatch(void) { |
| 2630 | try { |
| 2631 | if (m_proceed) { |
| 2632 | if (m_msg == nullptr) { |
| 2633 | LogMessage msg(m_level, m_file, m_line, m_func, m_verboseLevel, |
| 2634 | m_logger); |
| 2635 | base::LogDispatcher(m_proceed, &msg, m_dispatchAction).dispatch(); |
| 2636 | } else { |
| 2637 | base::LogDispatcher(m_proceed, m_msg, m_dispatchAction).dispatch(); |
| 2638 | } |
| 2639 | } |
| 2640 | if (m_logger != nullptr) { |
| 2641 | m_logger->stream().str(ELPP_LITERAL("")); |
| 2642 | m_logger->releaseLock(); |
| 2643 | } |
| 2644 | if (m_proceed && m_level == Level::Fatal |
| 2645 | && !ELPP->hasFlag(LoggingFlag::DisableApplicationAbortOnFatalLog)) { |
| 2646 | base::Writer(Level::Warning, m_file, m_line, m_func).construct(1, base::consts::kDefaultLoggerId) |
| 2647 | << "Aborting application. Reason: Fatal log at [" << m_file << ":" << m_line << "]"; |
| 2648 | std::stringstream reasonStream; |
| 2649 | reasonStream << "Fatal log at [" << m_file << ":" << m_line << "]" |
| 2650 | << " If you wish to disable 'abort on fatal log' please use " |
| 2651 | << "el::Loggers::addFlag(el::LoggingFlag::DisableApplicationAbortOnFatalLog)"; |
| 2652 | base::utils::abort(1, reasonStream.str()); |
| 2653 | } |
| 2654 | m_proceed = false; |
| 2655 | } |
| 2656 | catch(std::exception & ex){ |
| 2657 | // Extremely low memory situation; don't let exception be unhandled. |
| 2658 | } |
| 2659 | } |
| 2660 | |
| 2661 | // PErrorWriter |
| 2662 |
nothing calls this directly
no test coverage detected