github.com/rawahars/moby@v24.0.4+incompatible/cmd/dockerd/grpclog.go (about) 1 package main 2 3 import ( 4 "github.com/sirupsen/logrus" 5 "google.golang.org/grpc/grpclog" 6 ) 7 8 // grpc's default logger is *very* noisy and uses "info" and even "warn" level logging for mostly useless messages. 9 // This function configures the grpc logger to step down the severity of all messages. 10 // 11 // info => trace 12 // warn => debug 13 // error => warn 14 func configureGRPCLog() { 15 l := logrus.WithField("library", "grpc") 16 grpclog.SetLoggerV2(grpclog.NewLoggerV2(l.WriterLevel(logrus.TraceLevel), l.WriterLevel(logrus.DebugLevel), l.WriterLevel(logrus.WarnLevel))) 17 }