logger

package
v0.0.0-...-748ecea Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 3 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 returns slog.Logger from context.

func NewContext

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

NewContext returns context with slog.Logger.

Types

type LogKey

type LogKey uint8

LogKey for setting keys.

const (
	Version     LogKey // version
	PanicReason        // panic_reason
	URL                // url
	Error              // err
	Reason             // reason
	Host               // host
	Port               // port
	Module             // module
	Environment        // environment
	Stack              // stack
	TaskID             // task_id
	TaskKind           // task_kind
)

Log keys.

func (LogKey) String

func (i LogKey) String() string

Jump to

Keyboard shortcuts

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