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

@ -377,11 +377,10 @@ func (cfg *config) parse(arguments []string) error {
func (cfg *config) configFromCmdLine() error {
// user-specified logger is not setup yet, use this logger during flag parsing
lg, err := zap.NewProduction()
lg, err := logutil.CreateDefaultZapLogger(zap.InfoLevel)
if err != nil {
return err
}
verKey := "ETCD_VERSION"
if verVal := os.Getenv(verKey); verVal != "" {
// unset to avoid any possible side-effect.