Skip to content

Commit 9374a1f

Browse files
Remove trailing whitespace from timestamp string
1 parent 2ae5310 commit 9374a1f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/util/timestamper.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ std::string monotonic_timestampert::stamp() const
4747
std::lldiv_t divmod = lldiv(cnt, 1000000);
4848

4949
std::stringstream ss;
50-
ss << divmod.quot << "." << std::setfill('0') << std::setw(6) << divmod.rem
51-
<< " ";
50+
ss << divmod.quot << "." << std::setfill('0') << std::setw(6) << divmod.rem;
5251
return ss.str();
5352
}
5453

@@ -67,7 +66,7 @@ std::string wall_clock_timestampert::stamp() const
6766

6867
std::stringstream ss;
6968
ss << std::put_time(&local, WALL_FORMAT) << std::setfill('0') << std::setw(6)
70-
<< u_seconds << " ";
69+
<< u_seconds;
7170
return ss.str();
7271
}
7372
#endif

src/util/ui_message.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ void ui_message_handlert::print(
110110
{
111111
console_message_handlert console_message_handler;
112112
std::stringstream ss;
113-
ss << time->stamp() << message;
113+
const std::string timestamp = time->stamp();
114+
ss << timestamp << (timestamp.empty() ? "" : " ") << message;
114115
console_message_handler.print(level, ss.str());
115116
}
116117
break;

0 commit comments

Comments
 (0)