ctxzap

package
v1.0.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract

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.

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.

func With

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

With append logging fields to context

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL