[bitcoin/bitcoin] Thread names in logs and deadlock debug tools (take 2) (#13168)

jamesob commented on this pull request.

> return strStamped;
}

+std::string BCLog::Logger::LogThreadnameStr(const std::string &str)
+{
+ if (!m_log_threadnames || !m_started_new_line) {
+ return str;
+ }
+ std::string thread_name = thread_util::GetInternalName();
+ // The longest thread name (with numeric suffix) we have at the moment is 13 characters.
+ thread_name.resize(13, ‘ ‘);

We’re now no longer resizing the internal threadname; thanks.

This post was last modified on June 14, 2018, 4:50 pm