mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 21:15:45 +00:00
log: align log message timestamp
With this change, all log messages will have the same width for the timestamp. The number of ms is rounded to 6 decimal places. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
This commit is contained in:
parent
0dc3282ae0
commit
9e8296b696
@ -89,7 +89,7 @@ impl log::Log for Logger {
|
|||||||
if record.file().is_some() && record.line().is_some() {
|
if record.file().is_some() && record.line().is_some() {
|
||||||
writeln!(
|
writeln!(
|
||||||
*(*(self.output.lock().unwrap())),
|
*(*(self.output.lock().unwrap())),
|
||||||
"cloud-hypervisor: {:?}: <{}> {}:{}:{} -- {}",
|
"cloud-hypervisor: {:.6?}: <{}> {}:{}:{} -- {}",
|
||||||
duration,
|
duration,
|
||||||
std::thread::current().name().unwrap_or("anonymous"),
|
std::thread::current().name().unwrap_or("anonymous"),
|
||||||
record.level(),
|
record.level(),
|
||||||
@ -100,7 +100,7 @@ impl log::Log for Logger {
|
|||||||
} else {
|
} else {
|
||||||
writeln!(
|
writeln!(
|
||||||
*(*(self.output.lock().unwrap())),
|
*(*(self.output.lock().unwrap())),
|
||||||
"cloud-hypervisor: {:?}: <{}> {}:{} -- {}",
|
"cloud-hypervisor: {:.6?}: <{}> {}:{} -- {}",
|
||||||
duration,
|
duration,
|
||||||
std::thread::current().name().unwrap_or("anonymous"),
|
std::thread::current().name().unwrap_or("anonymous"),
|
||||||
record.level(),
|
record.level(),
|
||||||
|
Loading…
Reference in New Issue
Block a user