log

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func From

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

From returns the logger associated with the given context.

func Logger

func Logger() *zap.Logger

Logger returns the global logger.

func Sync added in v0.0.1

func Sync(ctx context.Context) error

Sync flushes any buffered log entries.

func With

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

With returns a new context with the given logger added to the context.

func WithFields

func WithFields(ctx context.Context, fields ...zap.Field) context.Context

WithFields returns a new context with the given fields added to the logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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