mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-12-15 16:09:39 -05:00
bootstrapper: disable gRPC logging (#3134)
* bootstrapper: disable gRPC logging * bootstrapper: remove debug flag * upgrade-agent: remove gRPC logging Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> --------- Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
This commit is contained in:
parent
1b7b80673c
commit
1989bce0a5
4 changed files with 13 additions and 18 deletions
|
|
@ -23,17 +23,14 @@ const (
|
|||
)
|
||||
|
||||
func main() {
|
||||
gRPCDebug := flag.Bool("debug", false, "Enable gRPC debug logging")
|
||||
verbosity := flag.Int("v", 0, logger.CmdLineVerbosityDescription)
|
||||
flag.Parse()
|
||||
|
||||
log := logger.NewJSONLogger(logger.VerbosityFromInt(*verbosity)).WithGroup("bootstrapper")
|
||||
|
||||
if *gRPCDebug {
|
||||
logger.ReplaceGRPCLogger(log.WithGroup("gRPC"))
|
||||
} else {
|
||||
logger.ReplaceGRPCLogger(slog.New(logger.NewLevelHandler(slog.LevelWarn, log.Handler())).WithGroup("gRPC"))
|
||||
}
|
||||
log := logger.NewJSONLogger(logger.VerbosityFromInt(*verbosity)).WithGroup("upgrade-agent")
|
||||
logger.ReplaceGRPCLogger(
|
||||
slog.New(
|
||||
logger.NewLevelHandler(logger.VerbosityFromInt(*verbosity), log.Handler()),
|
||||
).WithGroup("gRPC"),
|
||||
)
|
||||
|
||||
handler := file.NewHandler(afero.NewOsFs())
|
||||
server, err := server.New(log, handler)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue