fix example

This commit is contained in:
2024-01-18 18:48:32 +01:00
parent a6b112cfcb
commit 96ff26334b
2 changed files with 5 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1 +1,2 @@
coverage.out coverage.out
example/example

View File

@@ -3,6 +3,8 @@ package main
import ( import (
"log/slog" "log/slog"
"os" "os"
"github.com/tlinden/yadu"
) )
type body string type body string
@@ -30,12 +32,12 @@ func removeTime(_ []string, a slog.Attr) slog.Attr {
} }
func main() { func main() {
opts := &YamlDumpHandlerOptions{ opts := &yadu.Options{
Level: slog.LevelDebug, Level: slog.LevelDebug,
//ReplaceAttr: removeTime, //ReplaceAttr: removeTime,
} }
logger := slog.New(NewYamlDumpHandler(os.Stdout, opts)) logger := slog.New(yadu.NewHandler(os.Stdout, opts))
slog.SetDefault(logger) slog.SetDefault(logger)