# 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 and interceptor log level for server side.
DefaultMessageProducer sets the log message and fields.
DurationInMilliseconds returns duration in ms format.
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.
WithLevels customizes the function for mapping gRPC return codes and interceptor log level statements.
WithMessageProducer customizes the function for message formation.
# Constants
FieldCode is a context field for return code.
FieldDeadline is a context field for return code.
FieldDuration is a context field for execution time.
FieldKind is a context field.
FieldMethod is a context field.
FieldService is a context field.
FieldStartTime is a context field for execution time.
FieldSystem is a context field.
LogLevelDebug logs are typically voluminous, and are usually disabled in production.
LogLevelError logs are high-priority.
LogLevelImportant logs have the same level as Info, but won't be discarded in any circumstances.
LogLevelInfo is the default logging priority.
LogLevelWarn logs are more important than Info, but don't need individual human review.
# Type aliases
CodeToLevel function defines the mapping between gRPC return codes and interceptor log level.
LogLevel is a logging priority.
MessageProducer produces a user defined log message.
Option to set up the logger.