/slogctx

Primary LanguageGoMIT LicenseMIT

slogctx

Go Reference license Build codecov Go Report Card

WORK IN PROGRESS

Installation

go get github.com/phsym/slogctx@latest

Example

package main

import (
	"errors"
	"log/slog"
	"os"

	"github.com/phsym/slogctx"
)

func main() {
	logger := slog.New(
		console.NewHandler(os.Stderr, &console.HandlerOptions{Level: slog.LevelDebug}),
	)
	slog.SetDefault(logger)
	// TBD ...
}

Performances

See benchmark file for details.

TBD ...