grpc_logger.go 335 B

1234567891011121314
  1. package fslog
  2. import (
  3. "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap"
  4. "google.golang.org/grpc"
  5. )
  6. func GRPCStreamServerLogger() grpc.StreamServerInterceptor {
  7. return grpc_zap.StreamServerInterceptor(logger)
  8. }
  9. func GRPCUnaryServerLogger() grpc.UnaryServerInterceptor {
  10. return grpc_zap.UnaryServerInterceptor(logger)
  11. }