diff options
| author | Lee *!* Clagett <code@leeclagett.com> | 2025-09-02 11:18:45 -0400 |
|---|---|---|
| committer | Lee *!* Clagett <code@leeclagett.com> | 2025-09-02 14:48:12 -0400 |
| commit | 36b12ed50a1a722a8399c9762831ebade9980796 (patch) | |
| tree | 13c831ec0b7474f125ba25349070dcf25876bd48 /external | |
| parent | 911c6799ddf1031841c689de016b1db03afbc397 (diff) | |
| download | monzero-core-36b12ed50a1a722a8399c9762831ebade9980796.tar.gz monzero-core-36b12ed50a1a722a8399c9762831ebade9980796.tar.xz monzero-core-36b12ed50a1a722a8399c9762831ebade9980796.zip | |
Fix logging lock, future optimizations may needed
Diffstat (limited to 'external')
| -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); |
