logger

package
v0.0.0-...-5193a12 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) *slog.Logger

FromContext gets the current logger from the context. If there is none it will return a noop logger.

func NewConsoleLogger

func NewConsoleLogger(level slog.Level) *slog.Logger

NewConsoleLogger returns a logger for the console.

func NewContext

func NewContext(ctx context.Context, logger *slog.Logger) context.Context

NewContext returns a new context with the logger in it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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