package ctx_zap

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

Index

Functions

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

Source Files

context.go

Version
v1.0.0
Published
May 2, 2018
Platform
linux/amd64
Imports
4 packages
Last checked
11 minutes ago

Tools for package owners.