This is a logging handler for the Go structured logger
It is originally based of this guide
It is used to print pretty logs, albeit not very fast.
Do not use this for performance critical applications. Bechmarks can be found here
The following is a simple example of how to use this package.
package main
import (
"log/slog"
"github.com/theleeeo/leolog"
)
func main() {
logger := slog.New(prettylog.NewHandler(nil))
slog.SetDefault(logger)
slog.Into("ahhh there are cowboys in my bedroom!", "yee", "haw")
}