mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-06 05:54:28 -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
|
@ -58,10 +58,11 @@ func New(
|
|||
|
||||
// Run starts the gRPC server on the given port, using the provided tlsConfig.
|
||||
func (s *Server) Run(creds credentials.TransportCredentials, port string) error {
|
||||
logger.ReplaceGRPCLogger(slog.New(logger.NewLevelHandler(slog.LevelWarn, s.log.Handler())).WithGroup("gRPC"))
|
||||
grpcLog := logger.GRPCLogger(s.log)
|
||||
logger.ReplaceGRPCLogger(grpcLog)
|
||||
grpcServer := grpc.NewServer(
|
||||
grpc.Creds(creds),
|
||||
logger.GetServerUnaryInterceptor(s.log.WithGroup("gRPC")),
|
||||
logger.GetServerUnaryInterceptor(grpcLog),
|
||||
)
|
||||
|
||||
joinproto.RegisterAPIServer(grpcServer, s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue