diff options
| author | j-berman <justinberman@protonmail.com> | 2025-11-07 16:00:57 -0800 |
|---|---|---|
| committer | j-berman <justinberman@protonmail.com> | 2025-11-11 10:44:26 -0800 |
| commit | a83a46d60059a063ec953ba15f4cdcc2b3874440 (patch) | |
| tree | a152e55dfff1e3b4a84dd83ae8648d15e189a21d /external | |
| parent | 3cc9d65c9374b541e64320052c933184944375ea (diff) | |
| download | monzero-core-a83a46d60059a063ec953ba15f4cdcc2b3874440.tar.gz monzero-core-a83a46d60059a063ec953ba15f4cdcc2b3874440.tar.xz monzero-core-a83a46d60059a063ec953ba15f4cdcc2b3874440.zip | |
Fix logging deadlock
Diffstat (limited to 'external')
| -rw-r--r-- | external/easylogging++/easylogging++.cc | 3 | ||||
| -rw-r--r-- | external/easylogging++/easylogging++.h | 27 |
2 files changed, 5 insertions, 25 deletions
diff --git a/external/easylogging++/easylogging++.cc b/external/easylogging++/easylogging++.cc index 891936b6b..90a2299bb 100644 --- a/external/easylogging++/easylogging++.cc +++ b/external/easylogging++/easylogging++.cc @@ -3057,8 +3057,9 @@ void Writer::triggerDispatch(void) { } if (m_proceed && m_level == Level::Fatal && !ELPP->hasFlag(LoggingFlag::DisableApplicationAbortOnFatalLog)) { + const std::string str = "Aborting application. Reason: Fatal log at [" + std::string(m_file) + ":" + std::to_string(m_line) + "]"; base::Writer(Level::Warning, Color::Default, m_file, m_line, m_func).construct(1, base::consts::kDefaultLoggerId) - << "Aborting application. Reason: Fatal log at [" << m_file << ":" << m_line << "]"; + << str; std::stringstream reasonStream; reasonStream << "Fatal log at [" << m_file << ":" << m_line << "]" << " If you wish to disable 'abort on fatal log' please use " diff --git a/external/easylogging++/easylogging++.h b/external/easylogging++/easylogging++.h index bcaba9072..3407b8a18 100644 --- a/external/easylogging++/easylogging++.h +++ b/external/easylogging++/easylogging++.h @@ -3272,9 +3272,7 @@ class Writer : base::NoCopy { processDispatch(); } - template <typename T> - inline typename std::enable_if<std::is_integral<T>::value, Writer&>::type - operator<<(T log) { + Writer& operator<<(const std::string &log) { #if ELPP_LOGGING_ENABLED if (m_proceed) { m_messageBuilder << log; @@ -3283,26 +3281,6 @@ class Writer : base::NoCopy { return *this; } - template <typename T> - inline typename std::enable_if<!std::is_integral<T>::value, Writer&>::type - operator<<(const T& log) { -#if ELPP_LOGGING_ENABLED - if (m_proceed) { - m_messageBuilder << log; - } -#endif // ELPP_LOGGING_ENABLED - return *this; - } - - inline Writer& operator<<(std::ostream& (*log)(std::ostream&)) { -#if ELPP_LOGGING_ENABLED - if (m_proceed) { - m_messageBuilder << log; - } -#endif // ELPP_LOGGING_ENABLED - return *this; - } - inline operator bool() { return true; } @@ -3619,8 +3597,9 @@ class DefaultPerformanceTrackingCallback : public PerformanceTrackingCallback { ss << ELPP_LITERAL("]"); } } + const std::string str = ss.str(); el::base::Writer(m_data->performanceTracker()->level(), m_data->file(), m_data->line(), m_data->func()).construct(1, - m_data->loggerId().c_str()) << ss.str(); + m_data->loggerId().c_str()) << str; } private: const PerformanceTrackingData* m_data; |
