server: Use default logging configuration instead of zap production one

This fixes problem where logs json changes format of timestamp.
This commit is contained in:
Marek Siarkowicz
2022-03-31 20:23:45 +02:00
parent e5bf23037a
commit 63346bfead
20 changed files with 129 additions and 69 deletions

View File

@ -19,6 +19,7 @@ import (
"fmt"
"github.com/spf13/cobra"
"go.etcd.io/etcd/client/pkg/v3/logutil"
snapshot "go.etcd.io/etcd/client/v3/snapshot"
"go.etcd.io/etcd/pkg/v3/cobrautl"
"go.uber.org/zap"
@ -48,7 +49,7 @@ func snapshotSaveCommandFunc(cmd *cobra.Command, args []string) {
cobrautl.ExitWithError(cobrautl.ExitBadArgs, err)
}
lg, err := zap.NewProduction()
lg, err := logutil.CreateDefaultZapLogger(zap.InfoLevel)
if err != nil {
cobrautl.ExitWithError(cobrautl.ExitError, err)
}