# Packages

`ctxzap` is a ctxlogger that is backed by Zap It accepts a user-configured `zap.Logger` that will be used for logging.

# Functions

AddFields adds zap 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 and interceptor log level for server side.
DefaultMessageProducer writes the default message.
DurationToDurationField uses a Duration field to log the request duration and leaves it up to Zap's encoder settings to determine how that is output.
DurationToTimeMillisField converts the duration to milliseconds and uses the key `grpc.time_ms`.
Extract takes the call-scoped Logger from grpc_zap 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 zap.Logger as a gRPC-level logger.
ReplaceGrpcLoggerV2 replaces the grpclog.LoggerV2 with the provided logger.
ReplaceGrpcLoggerV2WithVerbosity replaces the grpclog.Logger with the provided logger and verbosity.
SetGrpcLoggerV2 replaces the grpc_log.Logger with the provided logger.
SetGrpcLoggerV2WithVerbosity replaces the grpc_.LoggerV2 with the provided logger and verbosity.
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 zap.Logger 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 zap.Logger 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 Zap 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

ClientField is used in every client-side log statement made through grpc_zap.
DefaultDurationToField is the default implementation of converting request duration to a Zap field.
JsonPbMarshaller is the marshaller used for serializing protobuf messages.
ServerField is used in every server-side log statement made through grpc_zap.Can be overwritten before initialization.
SystemField is used in every log statement made through grpc_zap.

# 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