fix: set levels

This commit is contained in:
Derrick Hammer 2024-01-28 04:57:43 -05:00
parent 470bce2209
commit e6c1bab602
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 5 additions and 1 deletions

View File

@ -15,6 +15,7 @@ import (
"go.uber.org/fx" "go.uber.org/fx"
"go.uber.org/fx/fxevent" "go.uber.org/fx/fxevent"
"go.uber.org/zap" "go.uber.org/zap"
"go.uber.org/zap/zapcore"
"net" "net"
"net/http" "net/http"
) )
@ -41,7 +42,10 @@ func main() {
return logger return logger
}), }),
fx.WithLogger(func(logger *zap.Logger) fxevent.Logger { fx.WithLogger(func(logger *zap.Logger) fxevent.Logger {
return &fxevent.ZapLogger{Logger: logger} log := &fxevent.ZapLogger{Logger: logger}
log.UseLogLevel(zapcore.InfoLevel)
log.UseErrorLevel(zapcore.ErrorLevel)
return log
}), }),
fx.Invoke(initCheckRequiredConfig), fx.Invoke(initCheckRequiredConfig),
fx.Provide(NewIdentity), fx.Provide(NewIdentity),