mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-11 16:30:12 -04:00
added and used LevelHandler
This commit is contained in:
parent
e40a99ca3a
commit
0e4d220c92
7 changed files with 56 additions and 24 deletions
|
@ -16,7 +16,6 @@ import (
|
|||
"github.com/edgelesssys/constellation/v2/internal/logger"
|
||||
"github.com/edgelesssys/constellation/v2/upgrade-agent/internal/server"
|
||||
"github.com/spf13/afero"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -33,8 +32,7 @@ func main() {
|
|||
if *gRPCDebug {
|
||||
logger.ReplaceGRPCLogger(log.WithGroup("gRPC"))
|
||||
} else {
|
||||
// TODO(miampf): Find a good way to change log level dynamically
|
||||
log.WithGroup("gRPC").WithIncreasedLevel(zap.WarnLevel).ReplaceGRPCLogger()
|
||||
logger.ReplaceGRPCLogger(slog.New(logger.NewLevelHandler(slog.LevelWarn, log.Handler())).WithGroup("gRPC"))
|
||||
}
|
||||
|
||||
handler := file.NewHandler(afero.NewOsFs())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue