...

Package ctx_zap

import "github.com/grpc-ecosystem/go-grpc-middleware/tags/zap"
Overview
Index

Overview ▾

func AddFields

func AddFields(ctx context.Context, fields ...zapcore.Field)

AddFields adds zap fields to the logger. Deprecated: should use the ctxzap.AddFields instead

func Extract

func Extract(ctx context.Context) *zap.Logger

Extract takes the call-scoped Logger from grpc_zap middleware. Deprecated: should use the ctxzap.Extract instead

func TagsToFields

func TagsToFields(ctx context.Context) []zapcore.Field

TagsToFields transforms the Tags on the supplied context into zap fields. Deprecated: use ctxzap.TagsToFields

func ToContext

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. Deprecated: use ctxzap.ToContext