log

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 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 returns a context with provided logger.

Types

type Logger

type Logger interface {
	Logf(msg string, args ...any)

	LogKV(kvs ...any)

	// WithKeyValues returns new logger with default key values
	WithKeyValues(kvs ...any) Logger
}

func GetLogger

func GetLogger(ctx context.Context) Logger

GetLogger returns logger from context if applicable. Or it will returns builtin logger.

func NewLogger

func NewLogger(level int32) Logger

NewLogger returns builtin Logger implementation.

Jump to

Keyboard shortcuts

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