func AddFields(ctx context.Context, fields ...zapcore.Field)
AddFields adds zap fields to the logger.
func Debug(ctx context.Context, msg string, fields ...zap.Field)
Debug is equivalent to calling Debug on the zap.Logger in the context. It is a no-op if the context does not contain a zap.Logger.
func Error(ctx context.Context, msg string, fields ...zap.Field)
Error is equivalent to calling Error on the zap.Logger in the context. It is a no-op if the context does not contain a zap.Logger.
func Extract(ctx context.Context) *zap.Logger
Extract takes the call-scoped Logger from grpc_zap middleware.
It always returns a Logger that has all the grpc_ctxtags updated.
▹ Example (Unary)
func Info(ctx context.Context, msg string, fields ...zap.Field)
Info is equivalent to calling Info on the zap.Logger in the context. It is a no-op if the context does not contain a zap.Logger.
func TagsToFields(ctx context.Context) []zapcore.Field
TagsToFields transforms the Tags on the supplied context into zap fields.
func ToContext(ctx context.Context, logger *zap.Logger) context.Context
ToContext adds the zap.Logger to the context for extraction later. Returning the new context that has been created.
func Warn(ctx context.Context, msg string, fields ...zap.Field)
Warn is equivalent to calling Warn on the zap.Logger in the context. It is a no-op if the context does not contain a zap.Logger.