use new yadu log handler, +tests, +upd modules, +version

This commit is contained in:
T.v.Dein
2024-01-19 14:21:02 +01:00
committed by Thomas von Dein
parent 3c93c9fce0
commit 1896209b96
5 changed files with 43 additions and 16 deletions

View File

@@ -26,6 +26,7 @@ import (
"runtime/debug"
"github.com/lmittmann/tint"
"github.com/tlinden/yadu"
)
const LevelNotice = slog.Level(2)
@@ -84,14 +85,14 @@ func Main(w io.Writer) int {
if conf.Debug {
// we're using a more verbose logger in debug mode
buildInfo, _ := debug.ReadBuildInfo()
opts := &tint.Options{
opts := &yadu.Options{
Level: logLevel,
AddSource: true,
NoColor: IsNoTty(),
//NoColor: IsNoTty(),
}
logLevel.Set(slog.LevelDebug)
handler := tint.NewHandler(w, opts)
handler := yadu.NewHandler(w, opts)
debuglogger := slog.New(handler).With(
slog.Group("program_info",
slog.Int("pid", os.Getpid()),