From cc7ab3d94c94c401927d669bbd4aa571f0b6a5b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilherme=20Brand=C3=A3o?= <37072140+guilherme-brandao@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:58:16 +0000 Subject: [PATCH] Prettifying logs (#38) --- cmd/node/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/node/main.go b/cmd/node/main.go index 06185c4..3b7c080 100644 --- a/cmd/node/main.go +++ b/cmd/node/main.go @@ -7,6 +7,7 @@ import ( "os" "os/signal" "path/filepath" + "time" "github.com/cockroachdb/pebble" "github.com/labstack/echo/v4" @@ -40,7 +41,7 @@ func run() int { signal.Notify(sig, os.Interrupt) // Initialize logging. - log := zerolog.New(os.Stderr).With().Timestamp().Logger().Level(zerolog.DebugLevel) + log := zerolog.New(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.RFC3339}).With().Timestamp().Logger().Level(zerolog.DebugLevel) // Parse CLI flags and validate that the configuration is valid. cfg := parseFlags()