Documentation ¶
Index ¶
- func Extract(ctx context.Context) *zap.Logger
- func MustGetLogger(cfg *Config) *zap.Logger
- func StreamServerInterceptor(log *zap.Logger) grpc.StreamServerInterceptor
- func ToContext(ctx context.Context, logger *zap.Logger) context.Context
- func UnaryServerInterceptor(log *zap.Logger) grpc.UnaryServerInterceptor
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustGetLogger ¶
MustGetLogger uses the provided configuration to construct a logger. If an error occurs, it panics.
func StreamServerInterceptor ¶
func StreamServerInterceptor(log *zap.Logger) grpc.StreamServerInterceptor
StreamServerInterceptor attaches a logger to the context.
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(log *zap.Logger) grpc.UnaryServerInterceptor
UnaryServerInterceptor attaches a logger to the context.
Types ¶
Click to show internal directories.
Click to hide internal directories.