grpc.go 243 B

12345678910111213
  1. package log
  2. import (
  3. "golang.org/x/net/context"
  4. "google.golang.org/grpc/grpclog"
  5. )
  6. func init() {
  7. ctx := WithModule(context.Background(), "grpc")
  8. // completely replace the grpc logger with the logrus logger.
  9. grpclog.SetLogger(G(ctx))
  10. }