don't truncate DateTime nanoseconds
where we don't care about them anyway.. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
4a363fb4a7
commit
151acf5d96
@ -1,5 +1,5 @@
|
||||
use anyhow::{Error};
|
||||
use chrono::{TimeZone, Local};
|
||||
use chrono::Local;
|
||||
use std::io::Write;
|
||||
|
||||
/// Log messages with timestamps into files
|
||||
@ -56,7 +56,7 @@ impl FileLogger {
|
||||
stdout.write_all(b"\n").unwrap();
|
||||
}
|
||||
|
||||
let line = format!("{}: {}\n", Local.timestamp(Local::now().timestamp(), 0).to_rfc3339(), msg);
|
||||
let line = format!("{}: {}\n", Local::now().to_rfc3339(), msg);
|
||||
self.file.write_all(line.as_bytes()).unwrap();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user