mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 22:34:56 -04:00
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:
parent
6e6ea1a9d5
commit
c11631ec11
12 changed files with 48 additions and 43 deletions
|
@ -35,6 +35,11 @@ import (
|
|||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// GRPCLogger returns a logger at warn level for gRPC logging.
|
||||
func GRPCLogger(l *slog.Logger) *slog.Logger {
|
||||
return slog.New(newLevelHandler(slog.LevelWarn, l.Handler())).WithGroup("gRPC")
|
||||
}
|
||||
|
||||
// ReplaceGRPCLogger replaces grpc's internal logger with the given logger.
|
||||
func ReplaceGRPCLogger(l *slog.Logger) {
|
||||
replaceGRPCLogger(l)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue