slogx

package
v0.0.113 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToContext added in v0.0.90

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

AddToContext adds the given logger to the context, returning the new context.

func Config added in v0.0.94

func Config(conf any) slog.Attr

...

TODO: document how to redact secrets.

func Err

func Err(err error) slog.Attr

...

func FromContext added in v0.0.90

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

FromContext returns the logger from the context, or the default logger if none exists.

func HealthStatus

func HealthStatus(status fmt.Stringer) slog.Attr

...

func Panic

func Panic(val any) slog.Attr

...

func RPCMethod

func RPCMethod(method string) slog.Attr

...

func RPCService

func RPCService(service string) slog.Attr

...

func RPCSystem added in v0.0.90

func RPCSystem(system string) slog.Attr

...

func Stacktrace

func Stacktrace() slog.Attr

...

func TraceID

func TraceID(span trace.Span) slog.Attr

...

Types

This section is empty.

Jump to

Keyboard shortcuts

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