[log] dispaly nano sec in timestamp

Signed-off-by: Leo Chen <leo@harmony.one>
pull/1428/head
Leo Chen 5 years ago
parent 591c6fbece
commit b743dcc840
  1. 2
      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().

Loading…
Cancel
Save