MCPcopy Create free account
hub / github.com/OriginQ/QPanda-2 / triggerDispatch

Method triggerDispatch

Extensions/PilotOSMachine/easylogging++.cpp:2629–2659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2627}
2628
2629void 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

Callers

nothing calls this directly

Calls 9

LogDispatcherClass · 0.85
abortFunction · 0.85
dispatchMethod · 0.80
streamMethod · 0.80
releaseLockMethod · 0.80
WriterClass · 0.70
strMethod · 0.45
hasFlagMethod · 0.45
constructMethod · 0.45

Tested by

no test coverage detected