Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 401 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 401 Bytes

slog-composite

slog.Logger that can have multiple handlers

Install

$ go get github.com/yyamanoi1222/slog-composite

Usage

package main

import (
	"log/slog"
	"os"

	slogcomposite "github.com/yyamanoi1222/slog-composite"
)

func main() {
	lgr := slogcomposite.New(
		slog.NewJSONHandler(os.Stdout, nil),
		slog.NewTextHandler(os.Stdout, nil),
	)
	lgr.Info("Hello World!")
}