logger

package
v0.0.0-...-1e20ff0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context(parent context.Context, logger *slog.Logger) context.Context

Context は logger を関連づけた parent のコピーを返す. logger は FromContext で取り出すことができる.

func FromContext

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

FromContext は ctx に関連づけられた *slog.Logger を返す. 関連づけられた *slog.Logger がなければ Root() の結果を返す.

func FromContextOrNil

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

FromContext は ctx に関連づけられた *slog.Logger を返す. 関連づけられた *slog.Logger がなければ nil を返す.

func Root

func Root() *slog.Logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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