# Functions
DefaultClientCodeToLevel is the default implementation of gRPC return codes to log levels for client side.
DefaultCodeToLevel is the default implementation of gRPC return codes to log levels for server side.
DurationToDurationField uses the duration value to log the request duration.
DurationToTimeMillisField converts the duration to milliseconds and uses the key `grpc.time_ms`.
GetRawJSON converts a Protobuf message to JSON bytes if less than MaxSize.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PayloadStreamClientInterceptor returns a new streaming client interceptor that logs the payloads of requests and responses.
PayloadStreamServerInterceptor returns a new server server interceptors that logs the payloads of requests.
PayloadUnaryClientInterceptor returns a new unary client interceptor that logs the payloads of requests and responses.
PayloadUnaryServerInterceptor returns a new unary server interceptors that logs the payloads of requests.
StreamClientInterceptor returns a new streaming client interceptor that optionally logs the execution of external gRPC calls.
StreamServerInterceptor returns a new streaming server interceptor that adds logrus.Entry to the context.
UnaryClientInterceptor returns a new unary client interceptor that optionally logs the execution of external gRPC calls.
UnaryServerInterceptor returns a new unary server interceptors that adds logrus.Entry to the context.
WithLogger customizes the function for mapping request durations to log fields.
# Variables
DefaultDurationToField is the default implementation of converting request duration to a log field (key and value).
JsonPbMarshaller is the marshaller used for serializing protobuf messages.
Marshaller of Protobuf to JSON.
# Type aliases
CodeToLevel function defines the mapping between gRPC return codes and interceptor log level.
DurationToField function defines how to produce duration fields for logging.
MessageProducer produces a user defined log message.
No description provided by the author