diff --git a/main.go b/main.go index 415ea9c..22940f3 100644 --- a/main.go +++ b/main.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "go.uber.org/zap" + "go.uber.org/zap/zapcore" "log" "net/http" "os" @@ -32,7 +33,10 @@ func main() { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - logger, err := zap.NewProduction() + loggerConfig := zap.NewProductionConfig() + loggerConfig.EncoderConfig.TimeKey = "time" + loggerConfig.EncoderConfig.EncodeTime = zapcore.RFC3339TimeEncoder + logger, err := loggerConfig.Build() if err != nil { log.Fatalf("failed to initialize zap logger: %v", err) }