From b743dcc8409d65268541f7ae8dec3ed6875768d9 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Mon, 26 Aug 2019 00:59:15 -0700 Subject: [PATCH] [log] dispaly nano sec in timestamp Signed-off-by: Leo Chen --- internal/utils/singleton.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/utils/singleton.go b/internal/utils/singleton.go index d51a209e4..d2a5a9685 100644 --- a/internal/utils/singleton.go +++ b/internal/utils/singleton.go @@ -9,6 +9,7 @@ import ( "path" "sync" "sync/atomic" + "time" "github.com/ethereum/go-ethereum/log" "github.com/natefinch/lumberjack" @@ -139,6 +140,7 @@ func setZeroLoggerFileOutput(filepath string, maxSize int) error { // Logger returns a zerolog.Logger singleton func Logger() *zerolog.Logger { if zeroLogger == nil { + zerolog.TimeFieldFormat = time.RFC3339Nano logger := zerolog.New(zerolog.ConsoleWriter{Out: os.Stderr}). Level(zeroLoggerLevel). With().