mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 14:51:07 +00:00
cli: fix milliseconds formatting on logs (#5507)
This commit is contained in:
@@ -186,8 +186,8 @@ pub fn init_logger(pattern: &str) {
|
|||||||
let name = ::std::thread::current()
|
let name = ::std::thread::current()
|
||||||
.name()
|
.name()
|
||||||
.map_or_else(Default::default, |x| format!("{}", Colour::Blue.bold().paint(x)));
|
.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 millis = (now.tm_nsec as f32 / 1000000.0).floor() as usize;
|
||||||
let timestamp = format!("{}.{:03}", timestamp, millis);
|
let timestamp = format!("{}.{}", timestamp, millis);
|
||||||
format!(
|
format!(
|
||||||
"{} {} {} {} {}",
|
"{} {} {} {} {}",
|
||||||
Colour::Black.bold().paint(timestamp),
|
Colour::Black.bold().paint(timestamp),
|
||||||
|
|||||||
Reference in New Issue
Block a user