observ

package
v0.0.0-...-394bd34 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorCtxKey = struct{}{}
)
View Source
var Logger = func() *slog.Logger {
	return slog.New(slog.NewJSONHandler(os.Stderr, nil))
}

Functions

func Log

func Log(ctx context.Context, msg string, args ...any)

func LogError

func LogError(ctx context.Context, msg string, fields ...any)

func LogMiddleware

func LogMiddleware(next http.Handler) http.Handler

func SetLogger

func SetLogger()

func Wrap

func Wrap(internalErr error, publicErr error) error

Types

type StackTracer

type StackTracer interface {
	Stacktrace() string
}

Jump to

Keyboard shortcuts

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