From 8af46c9eff02e8ef3c85bc45314c986052080fbd Mon Sep 17 00:00:00 2001 From: Victor Yves Crispim Date: Wed, 20 Mar 2024 15:11:27 -0300 Subject: [PATCH] feat(log): change the date format Uses RFC3339 with milliseconds and without timezone --- cmd/cartesi-rollups-node/main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/cartesi-rollups-node/main.go b/cmd/cartesi-rollups-node/main.go index 7a5e73bdd..e45a39d7f 100644 --- a/cmd/cartesi-rollups-node/main.go +++ b/cmd/cartesi-rollups-node/main.go @@ -33,9 +33,10 @@ func main() { // setup log opts := &tint.Options{ - Level: config.LogLevel, - AddSource: config.LogLevel == slog.LevelDebug, - NoColor: !config.LogPretty || !isatty.IsTerminal(os.Stdout.Fd()), + Level: config.LogLevel, + AddSource: config.LogLevel == slog.LevelDebug, + NoColor: !config.LogPretty || !isatty.IsTerminal(os.Stdout.Fd()), + TimeFormat: "2006-01-02T15:04:05.000", // RFC3339 with milliseconds and without timezone } handler := tint.NewHandler(os.Stdout, opts) logger := slog.New(handler)