fix: set levels
This commit is contained in:
parent
470bce2209
commit
e6c1bab602
|
@ -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),
|
||||||
|
|
Loading…
Reference in New Issue