logger

package
v0.0.0-...-8ccfa88 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraceIDAttr = "trace_id"
	SpanIDAttr  = "span_id"
)

Variables

Functions

func Init

func Init(development bool)

func With

func With(args ...any) *slog.Logger

func WithGroup

func WithGroup(name string) *slog.Logger

Types

type ContextHandler

type ContextHandler struct {
	slog.Handler
}

func (ContextHandler) Handle

func (h ContextHandler) Handle(ctx context.Context, r slog.Record) error

func (ContextHandler) WithAttrs

func (h ContextHandler) WithAttrs(attrs []slog.Attr) slog.Handler

func (ContextHandler) WithGroup

func (h ContextHandler) WithGroup(name string) slog.Handler

Jump to

Keyboard shortcuts

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