Documentation ¶
Index ¶
- Constants
- func Error(err error) zapcore.Field
- func Fields(ctx context.Context) []interface{}
- func ProtoMessage(key string, val interface{}) zapcore.Field
- func StreamServerInterceptor(logger *zap.Logger, opts ...Option) grpc.StreamServerInterceptor
- func UnaryServerInterceptor(logger *zap.Logger, opts ...Option) grpc.UnaryServerInterceptor
- func WithFields(ctx context.Context, fields []zapcore.Field) context.Context
- func ZapFields(ctx context.Context) []zapcore.Field
- type Leveler
- type LevelerFunc
- type Option
- type PayloadLeveler
Constants ¶
View Source
const DefaultPayloadLevel = zapcore.Level(zapcore.DebugLevel - 1)
DefaultPayloadLevel is default level to use when logging payloads
Variables ¶
This section is empty.
Functions ¶
func StreamServerInterceptor ¶
func StreamServerInterceptor(logger *zap.Logger, opts ...Option) grpc.StreamServerInterceptor
Types ¶
type Leveler ¶
Leveler returns a zap level to use when logging from a grpc interceptor.
type Option ¶
type Option func(o *options)
func WithPayloadLeveler ¶
func WithPayloadLeveler(l PayloadLeveler) Option
Click to show internal directories.
Click to hide internal directories.