Help us shape the future of Go! Take the 2026 Go Developer Survey

logging

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default() *slog.Logger

func ErrAttr

func ErrAttr(err error) slog.Attr

func From

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

func New

func New(w io.Writer, level slog.Level, format Format, stacktrace bool) *slog.Logger

func Quiet

func Quiet()

func SetDefault

func SetDefault(logger *slog.Logger)

func With

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

Types

type Format

type Format int
const (
	FormatConsole Format = iota + 1
	FormatJSON
)

Jump to

Keyboard shortcuts

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