diff options
| author | tobtoht <tob@featherwallet.org> | 2025-09-24 20:51:55 +0000 |
|---|---|---|
| committer | tobtoht <tob@featherwallet.org> | 2025-09-24 20:51:55 +0000 |
| commit | 2d1972299ad8ee5a731d1b2d1b1fbebbb4ff034d (patch) | |
| tree | fd97d53d7f395814784a2e2828d82c0adc2b130d | |
| parent | fc0ff59adfa621edfdb292c2cdc70108bdd1fa2a (diff) | |
| parent | 36b12ed50a1a722a8399c9762831ebade9980796 (diff) | |
| download | monzero-core-2d1972299ad8ee5a731d1b2d1b1fbebbb4ff034d.tar.gz monzero-core-2d1972299ad8ee5a731d1b2d1b1fbebbb4ff034d.tar.xz monzero-core-2d1972299ad8ee5a731d1b2d1b1fbebbb4ff034d.zip | |
Merge pull request #10066
36b12ed Fix logging lock, future optimizations may needed (Lee *!* Clagett)
| -rw-r--r-- | external/easylogging++/easylogging++.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/external/easylogging++/easylogging++.h b/external/easylogging++/easylogging++.h index b983a796c..bcaba9072 100644 --- a/external/easylogging++/easylogging++.h +++ b/external/easylogging++/easylogging++.h @@ -3260,12 +3260,12 @@ class Writer : base::NoCopy { const char* func, base::DispatchAction dispatchAction = base::DispatchAction::NormalLog, base::type::VerboseLevel verboseLevel = 0) : m_msg(nullptr), m_level(level), m_color(color), m_file(file), m_line(line), m_func(func), m_verboseLevel(verboseLevel), - m_logger(nullptr), m_proceed(false), m_dispatchAction(dispatchAction) { + m_logger(nullptr), m_proceed(false), m_dispatchAction(dispatchAction), m_sync(ELPP->lock()) { } Writer(LogMessage* msg, base::DispatchAction dispatchAction = base::DispatchAction::NormalLog) : m_msg(msg), m_level(msg != nullptr ? msg->level() : Level::Unknown), - m_line(0), m_logger(nullptr), m_proceed(false), m_dispatchAction(dispatchAction) { + m_line(0), m_logger(nullptr), m_proceed(false), m_dispatchAction(dispatchAction), m_sync(ELPP->lock()) { } virtual ~Writer(void) { @@ -3323,6 +3323,7 @@ class Writer : base::NoCopy { base::MessageBuilder m_messageBuilder; base::DispatchAction m_dispatchAction; std::vector<std::string> m_loggerIds; + base::threading::ScopedLock m_sync; friend class el::Helpers; void initializeLogger(const std::string& loggerId, bool lookup = true, bool needLock = true); |
