log: Fix precise timestamps missing a trailing space
Without this, log messages with --log-precise enabled tend to look just a bit *off*: 20201019 23:09:21.786752info general: attempting to generate locale by name 'en_US.UTF-8' ^
This commit is contained in:
parent
0bfb9101a8
commit
858f55c7fd
2 changed files with 2 additions and 1 deletions
|
@ -17,6 +17,7 @@
|
|||
### WML Engine
|
||||
### Miscellaneous and Bug Fixes
|
||||
* Fixed a rare issue on Windows that could result in wesnoth.exe sticking around waiting for console input after encountering an error despite not being launched with the `--wconsole` option.
|
||||
* Fixed precise log timestamps missing a space between the timestamp and the log severity label.
|
||||
|
||||
## Version 1.15.6
|
||||
### Add-ons client
|
||||
|
|
|
@ -204,7 +204,7 @@ static void print_precise_timestamp(std::ostream& out) noexcept
|
|||
std::time_t seconds = micros/1'000'000;
|
||||
int fractional = micros-(seconds*1'000'000);
|
||||
char c = out.fill('0');
|
||||
out << std::put_time(std::localtime(&seconds), "%Y%m%d %H:%M:%S") << "." << std::setw(6) << fractional;
|
||||
out << std::put_time(std::localtime(&seconds), "%Y%m%d %H:%M:%S") << "." << std::setw(6) << fractional << ' ';
|
||||
out.fill(c);
|
||||
} catch(...) {}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue