Skip to content

emicklei/htmlslog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

html slog

package main

import (
	"fmt"
	"log/slog"

	"github.com/emicklei/htmlslog"
)

func main() {
	handler := htmlslog.New(os.Stdout, htmlslog.Options{Level: slog.LevelInfo, Title: "Test"})
	mylog := slog.New(handler)
	mylog.Info("Hello, world!")
	handler.Close()
}

See https://goplay.tools/snippet/TaQ0B5ecFBX

About

Go slog.Handler that produces HTML

Resources

Stars

Watchers

Forks

Packages