logging

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const LoggerKey loggerKeyType = iota

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) *log.Entry

FromContext retrieves the current logger from the context. If no logger is available, the default logger is returned.

func WithLogger

func WithLogger(ctx context.Context, logger *log.Entry) context.Context

WithLogger returns a new context with the provided logger. Use in combination with logger.WithField(s) for great effect.

Types

This section is empty.

Jump to

Keyboard shortcuts

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