base: add nanoseconds to log timestamps.

We accidentally removed nanosecond precision at some point (likely when
I redid the formatter). This CL fixes that.

BUG=b:237004396
TEST=tested format string in the playground

Change-Id: Iaa502c13c34c9cc8f4b7be05821a63c8f10cb360
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3722782
Commit-Queue: Noah Gold <nkgold@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Noah Gold 2022-06-23 16:33:44 -07:00 committed by Chromeos LUCI
parent 5cf9a8fb87
commit 2bb4f97051

View file

@ -256,7 +256,7 @@ impl State {
writeln!( writeln!(
buf, buf,
"[{} {:5} {}] {}", "[{} {:5} {}] {}",
Local::now().format("%Y-%m-%dT%H:%M:%S%:z"), Local::now().format("%Y-%m-%dT%H:%M:%S%.9f%:z"),
record.level(), record.level(),
record.module_path().unwrap_or("<missing module path>"), record.module_path().unwrap_or("<missing module path>"),
record.args() record.args()