mirror of
https://codeberg.org/scip/kleingebaeck.git
synced 2025-12-16 20:11:01 +01:00
use new yadu log handler, +tests, +upd modules, +version
This commit is contained in:
7
main.go
7
main.go
@@ -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()),
|
||||
|
||||
Reference in New Issue
Block a user