zlogger

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CtxLoggerObject reference to the zap.Logger
	CtxLoggerObject = struct{ s string }{"logger"}
)

Functions

func FromContext

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

FromContext logger object

func New

func New(serviceName, logEncoder, logLevel, addr string, options ...zap.Option) (*zap.Logger, error)

New creates new zap logger object

func WithLogger

func WithLogger(ctx context.Context, logger *zap.Logger) context.Context

WithLogger puts logger 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