Documentation ¶
Overview ¶
Package log provides simple grpc logging middleware
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractMetadata ¶
ExtractMetadata formats metadata from incoming grpc context as string for the log.
Types ¶
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware provides grpc logging middleware.
func NewMiddleware ¶
func NewMiddleware(logger *log.Logger) *Middleware
NewMiddleware creates new logging middleware.
func (*Middleware) StreamInterceptor ¶
func (m *Middleware) StreamInterceptor() grpc.StreamServerInterceptor
StreamInterceptor returns grpc StreamServerInterceptor.
func (*Middleware) UnaryInterceptor ¶
func (m *Middleware) UnaryInterceptor() grpc.UnaryServerInterceptor
UnaryInterceptor returns grpc UnaryServerInterceptor.
Click to show internal directories.
Click to hide internal directories.