Documentation
¶
Overview ¶
Package goaslog contains an adapter that makes it possible to configure goa so it uses log/slog as logger backend. Usage:
handler := slog.NewJSONHandler(os.Stderr, nil)
// Initialize logger handler using [log/slog] package
service.WithLogger(goaslog.New(handler))
// ... Proceed with configuring and starting the goa service
// In handlers:
goaslog.Entry(ctx).Info("foo", "bar")
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(handler slog.Handler) goa.LogAdapter
New wraps a log/slog.Handler into a goa logger.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.