mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
logging: fix logging empty threadname
This commit is contained in:
parent
345457b542
commit
3a171f742c
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue