Skip to content
Snippets Groups Projects
Commit 2e720f93 authored by André Silva's avatar André Silva Committed by GitHub
Browse files

cli: fix milliseconds formatting on logs (#5507)

parent 9a14d45a
No related merge requests found
......@@ -186,8 +186,8 @@ pub fn init_logger(pattern: &str) {
let name = ::std::thread::current()
.name()
.map_or_else(Default::default, |x| format!("{}", Colour::Blue.bold().paint(x)));
let millis = (now.tm_nsec as f32 / 1000000.0).round() as usize;
let timestamp = format!("{}.{:03}", timestamp, millis);
let millis = (now.tm_nsec as f32 / 1000000.0).floor() as usize;
let timestamp = format!("{}.{}", timestamp, millis);
format!(
"{} {} {} {} {}",
Colour::Black.bold().paint(timestamp),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment