# Functions

AddFields updates the fields already in the context that will be used by the logging interceptor or can be extracted further in ExtractFields.
DefaultClientCodeToLevel is the helper mapper that maps gRPC return codes to log levels for client side.
No description provided by the author
DefaultServerCodeToLevel is the helper mapper that maps gRPC return codes to log levels for server side.
DurationToDurationField uses a Duration field to log the request duration and leaves it up to Log's encoder settings to determine how that is output.
DurationToTimeMillisFields converts the duration to milliseconds and uses the key `grpc.time_ms`.
ExtractFields returns logging fields from the context.
InjectFields returns a new context with merged fields that will be used by the logging interceptor or can be extracted further in ExtractFields.
InjectLogField is like InjectFields, just for one field.
StreamClientInterceptor returns a new streaming client interceptor that optionally logs the execution of external gRPC calls.
StreamServerInterceptor returns a new stream server interceptors that optionally logs endpoint handling.
UnaryClientInterceptor returns a new unary client interceptor that optionally logs the execution of external gRPC calls.
UnaryServerInterceptor returns a new unary server interceptors that optionally logs endpoint handling.
WithCodes customizes the function for mapping errors to error codes.
WithDisableLoggingFields disables logging of gRPC fields provided.
WithDurationField customizes the function for mapping request durations to log fields.
WithErrorFields allows to extract logging fields from an error.
WithFieldsFromContext allows overriding existing or adding extra fields to all log messages per given context.
WithFieldsFromContextAndCallMeta allows overriding existing or adding extra fields to all log messages per given context and interceptor.CallMeta If called multiple times, it overwrites the existing FieldsFromContext/WithFieldsFromContextAndCallMeta function.
WithLevels customizes the function for mapping gRPC return codes and interceptor log level statements.
WithLogOnEvents customizes on what events the gRPC interceptor should log on.
WithTimestampFormat customizes the timestamps emitted in the log fields.

# Constants

FinishCall is a loggable event representing finish of the gRPC call.
Second, we wanted to make it easy to use levels to specify logger verbosity.
Second, we wanted to make it easy to use levels to specify logger verbosity.
Second, we wanted to make it easy to use levels to specify logger verbosity.
Second, we wanted to make it easy to use levels to specify logger verbosity.
PayloadReceived is a loggable event representing received request (server) or response (client).
PayloadSent is a loggable event representing sent response (server) or request (client).
StartCall is a loggable event representing start of the gRPC call.

# Variables

ComponentFieldKey is a tag representing the client/server that is calling.
DefaultDurationToFields is the default implementation of converting request duration to a field.
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
SystemTag is tag representing an event inside gRPC call.

# Interfaces

Logger requires Log method, similar to experimental slog, allowing logging interceptor to be interoperable.

# Type aliases

CodeToLevel function defines the mapping between gRPC return codes and interceptor log level.
DurationToFields function defines how to produce duration fields for logging.
ErrorToCode function determines the error code of an error.
ErrorToFields function extract fields from error.
Fields loosely represents key value pairs that adds context to log lines.
A Level is the importance or severity of a log event.
LoggableEvent defines the events a log line can be added on.
LoggerFunc is a function that also implements Logger interface.
No description provided by the author