logger

package
v0.0.0-...-2ba7617 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context, logr Logger) context.Context

NewContext creates a context with the provided logger inside.

Types

type Logger

type Logger interface {
	Info(msg string, args ...any)
	Debug(msg string, args ...any)
	Warn(msg string, args ...any)
	Error(msg string, args ...any)
}

Logger defines a logging interface for this project.

func FromContext

func FromContext(ctx context.Context) Logger

FromContext fetches logger from provided context. If a logger doesn't exist, it returns the DefaultLogger.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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