mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-04-20 23:36:29 -04:00
bootstrapper: disable gRPC logging
This commit is contained in:
parent
ce3b00668b
commit
67b6b4dc55
@ -43,15 +43,21 @@ const (
|
||||
)
|
||||
|
||||
func main() {
|
||||
gRPCDebug := flag.Bool("debug", false, "Enable gRPC debug logging")
|
||||
debug := flag.Bool("debug", false, "Enable debug logging")
|
||||
gRPCDebug := flag.Bool("grpc-debug", false, "Enable gRPC debug logging")
|
||||
verbosity := flag.Int("v", 0, logger.CmdLineVerbosityDescription)
|
||||
flag.Parse()
|
||||
log := logger.NewJSONLogger(logger.VerbosityFromInt(*verbosity)).WithGroup("bootstrapper")
|
||||
|
||||
level := slog.LevelWarn
|
||||
if *debug {
|
||||
level = slog.LevelDebug
|
||||
}
|
||||
|
||||
if *gRPCDebug {
|
||||
logger.ReplaceGRPCLogger(log.WithGroup("gRPC"))
|
||||
} else {
|
||||
logger.ReplaceGRPCLogger(slog.New(logger.NewLevelHandler(slog.LevelWarn, log.Handler())).WithGroup("gRPC"))
|
||||
logger.ReplaceGRPCLogger(slog.New(logger.NewLevelHandler(level, log.Handler())).WithGroup("gRPC"))
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
Loading…
x
Reference in New Issue
Block a user