logging: fix logging empty threadname

24.x
klementtan 2 years ago
parent 345457b542
commit 3a171f742c
No known key found for this signature in database
GPG Key ID: 65C8E4FECB5E5DA2

@ -364,7 +364,8 @@ void BCLog::Logger::LogPrintStr(const std::string& str, const std::string& loggi
}
if (m_log_threadnames && m_started_new_line) {
str_prefixed.insert(0, "[" + util::ThreadGetInternalName() + "] ");
const auto threadname = util::ThreadGetInternalName();
str_prefixed.insert(0, "[" + (threadname.empty() ? "unknown" : threadname) + "] ");
}
str_prefixed = LogTimestampStr(str_prefixed);

Loading…
Cancel
Save