logging: reduce grpc logging noise (#3329)

* Normalize gRPC logs to print at warn level only
* Fix grpcLogger level enablement

---------

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2024-08-29 10:44:22 +02:00 committed by GitHub
parent 6e6ea1a9d5
commit c11631ec11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 48 additions and 43 deletions

View file

@ -26,11 +26,7 @@ func main() {
verbosity := flag.Int("v", 0, logger.CmdLineVerbosityDescription)
flag.Parse()
log := logger.NewJSONLogger(logger.VerbosityFromInt(*verbosity)).WithGroup("upgrade-agent")
logger.ReplaceGRPCLogger(
slog.New(
logger.NewLevelHandler(logger.VerbosityFromInt(*verbosity), log.Handler()),
).WithGroup("gRPC"),
)
logger.ReplaceGRPCLogger(logger.GRPCLogger(log))
handler := file.NewHandler(afero.NewOsFs())
server, err := server.New(log, handler)