logging: use remychantenay/slog-otel

This commit is contained in:
2023-10-21 22:09:48 -07:00
parent a4447c97f6
commit 5b033a1f0b
3 changed files with 7 additions and 16 deletions

View File

@@ -8,7 +8,7 @@ import (
"strconv"
"sync"
"github.com/ttys3/slogx"
slogotel "github.com/remychantenay/slog-otel"
)
var ConfigPrefix = ""
@@ -50,7 +50,9 @@ func Setup() *slog.Logger {
logOptions.ReplaceAttr = logReplace
}
logHandler := slogx.NewTracingHandler(slog.NewTextHandler(os.Stderr, logOptions))
logHandler := slogotel.OtelHandler{
Next: slog.NewTextHandler(os.Stderr, logOptions),
}
// https://github.com/cyrusaf/ctxlog/pull/1
// log := slog.New(ctxlog.NewHandler(logHandler))