log

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithLogger

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

WithLogger adds a logger to the context

Types

type Logger

type Logger interface {
	Printf(format string, v ...any)
}

Logger is an interface for logging diagnostics

func FromContext

func FromContext(ctx context.Context) Logger

FromContext retrieves the logger from context Returns a no-op logger if not present

Jump to

Keyboard shortcuts

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