small fix, don't worry about it

This commit is contained in:
Tomas Dvorak
2026-04-10 12:06:24 +02:00
commit 5c500a72b0
243 changed files with 44176 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
package logger
import "go.uber.org/zap"
func New(env string) *zap.Logger {
if env == "production" {
log, err := zap.NewProduction()
if err == nil {
return log
}
}
config := zap.NewDevelopmentConfig()
config.EncoderConfig.TimeKey = "ts"
log, err := config.Build()
if err != nil {
return zap.Must(zap.NewDevelopment())
}
return log
}