mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
Logging: Improve text layout when discarding log timestamps
When timestamps are removed from logging, the current text layout shows lines like tid 12345 thread_name: Example log Let's convert it to a more conforming layout: thread_name[12345]: Example log Signed-off-by: Kai Krakow <kai@kaishome.de>
This commit is contained in:
parent
5533d09b3d
commit
d6312c338b
@ -70,13 +70,15 @@ namespace crucible {
|
||||
|
||||
header_stream << buf;
|
||||
header_stream << " " << getpid() << "." << gettid() << "<" << m_loglevel << ">";
|
||||
if (!m_name.empty()) {
|
||||
header_stream << " " << m_name;
|
||||
}
|
||||
} else {
|
||||
header_stream << "<" << m_loglevel << ">tid " << gettid();
|
||||
header_stream << "<" << m_loglevel << ">";
|
||||
header_stream << (m_name.empty() ? "thread" : m_name);
|
||||
header_stream << "[" << gettid() << "]";
|
||||
}
|
||||
|
||||
if (!m_name.empty()) {
|
||||
header_stream << " " << m_name;
|
||||
}
|
||||
header_stream << ": ";
|
||||
|
||||
string out = m_oss.str();
|
||||
|
Loading…
x
Reference in New Issue
Block a user