Documentation
¶
Index ¶
Constants ¶
View Source
const LevelTrace = slog.Level(-8)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is a custom slog.Handler that writes out application logs in a human-readable format. We don't really need structured logs for this application; it's just that slog is very easy to work with.
Loosely based on https://github.com/telemachus/humane/blob/0bf66cc42a0f7164f38b525497a74dabd4510ed8/humane.go
func NewHandler ¶
func NewHandler(dest io.Writer, opts *HandlerOptions) *Handler
type HandlerOptions ¶
type Logger ¶
Logger is a wrapper over slog.Logger that writes application logs in its own format.
func NewDiscardLogger ¶
func NewDiscardLogger() *Logger
Click to show internal directories.
Click to hide internal directories.