Edward O'Callaghan has submitted this change. ( https://review.coreboot.org/c/flashrom/+/69269 )
Change subject: flashrom_tester: Change timestamp to UTC microsecond ......................................................................
flashrom_tester: Change timestamp to UTC microsecond
Match the timestamp with dmesg and other logs for ease of comparing.
BUG=b:246250254 BRANCH=None TEST=flashrom_tester --libflashrom host
Change-Id: I05182f52c0e9392a4fa2b388fdc30633e5d6e5ef Signed-off-by: Evan Benn evanbenn@chromium.org Reviewed-on: https://review.coreboot.org/c/flashrom/+/69269 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Edward O'Callaghan quasisec@chromium.org --- M util/flashrom_tester/src/logger.rs 1 file changed, 21 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Edward O'Callaghan: Looks good to me, approved
diff --git a/util/flashrom_tester/src/logger.rs b/util/flashrom_tester/src/logger.rs index 12e5495..3c9b74b 100644 --- a/util/flashrom_tester/src/logger.rs +++ b/util/flashrom_tester/src/logger.rs @@ -58,8 +58,8 @@
fn log(&self, record: &log::Record) { fn log_internal<W: Write>(mut w: W, record: &log::Record) -> std::io::Result<()> { - let now = chrono::Local::now(); - write!(w, "{}{} ", types::MAGENTA, now.format("%Y-%m-%dT%H:%M:%S"))?; + let now = chrono::Utc::now().to_rfc3339_opts(chrono::SecondsFormat::Micros, true); + write!(w, "{}{} ", types::MAGENTA, now)?; write!( w, "{}[ {} ]{} ",