# Packages

`ctxlogrus` is a ctxlogger that is backed by logrus It accepts a user-configured `logrus.Logger` that will be used for logging.

# Functions

AddFields adds logrus fields to the logger.
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.
DefaultMessageProducer writes the default message.
DurationToDurationField uses the duration value to log the request duration.
DurationToTimeMillisField converts the duration to milliseconds and uses the key `grpc.time_ms`.
Extract takes the call-scoped logrus.Entry from grpc_logrus middleware.
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.
ReplaceGrpcLogger sets the given logrus.Logger as a gRPC-level logger.
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.
WithCodes customizes the function for mapping errors to error codes.
WithDecider customizes the function for deciding if the gRPC interceptor logs should log.
WithDurationField customizes the function for mapping request durations to log fields.
WithLevels customizes the function for mapping gRPC return codes and interceptor log level statements.
WithMessageProducer customizes the function for message formation.
WithTimestampFormat customizes the timestamps emitted in the 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.
KindField describes the log field used to indicate whether this is a server or a client log statement.
SystemField is used in every log statement made through grpc_logrus.

# 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