logging

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

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

FromContext returns the logger from the context if one exists. Otherwise it returns a new logger.

func GRPCLogFieldsToZap added in v0.30.0

func GRPCLogFieldsToZap(fields logging.Fields) []zap.Field

func InitLogging

func InitLogging(ctx context.Context, level string)

InitLogging initializes the global logger.

func ReqScopeLog added in v0.30.0

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

ReqScopeLog returns a request-scoped logger with request fields populated.

func ToContext

func ToContext(ctx context.Context, log *zap.Logger) context.Context

ToContext adds a logger to the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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