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

@ -164,16 +164,14 @@ func newGRPCProxyStartCommand() *cobra.Command {
func startGRPCProxy(cmd *cobra.Command, args []string) {
checkArgs()
lcfg := logutil.DefaultZapLoggerConfig
lvl := zap.InfoLevel
if grpcProxyDebug {
lcfg.Level = zap.NewAtomicLevelAt(zap.DebugLevel)
lvl = zap.DebugLevel
grpc.EnableTracing = true
}
lg, err := lcfg.Build()
lg, err := logutil.CreateDefaultZapLogger(lvl)
if err != nil {
log.Fatal(err)
panic(err)
}
defer lg.Sync()