Workaround the EOL at the end of the timestamp, and reduce its size.
This commit is contained in:
parent
914823feef
commit
bc9a69097c
1 changed files with 3 additions and 1 deletions
|
@ -92,7 +92,9 @@ std::ostream &logger::operator()(log_domain const &domain, bool show_names) cons
|
|||
else {
|
||||
if (timestamp) {
|
||||
time_t t = time(NULL);
|
||||
std::cerr << ctime(&t) << ' ';
|
||||
char buf[100];
|
||||
strftime(buf, 100, "%b %d %H:%M:%S ", localtime(&t));
|
||||
std::cerr << buf;
|
||||
}
|
||||
if (show_names)
|
||||
std::cerr << name_ << ' ' << d.name_ << ": ";
|
||||
|
|
Loading…
Add table
Reference in a new issue