logger

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromCtx

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

FromCtx returns the Logger associated with the ctx. If no logger is associated, the default logger is returned, unless it is nil in which case a disabled logger is returned.

func Get

func Get() *zap.Logger

Get initializes a zap.Logger instance if it has not been initialized already and returns the same instance for subsequent calls.

func WithCtx

func WithCtx(ctx context.Context, l *zap.Logger) context.Context

WithCtx returns a copy of ctx with the Logger attached.

Types

This section is empty.

Jump to

Keyboard shortcuts

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