mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-01-13 21:21:03 +00:00
feat: colorize log output
Makes it easier to read, uses lmittmann/tint.
This commit is contained in:
parent
e59b1eb34d
commit
72e1d5a320
3 changed files with 12 additions and 3 deletions
|
|
@ -7,7 +7,9 @@ import (
|
|||
"os/signal"
|
||||
"runtime/debug"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/lmittmann/tint"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
@ -76,8 +78,12 @@ func Execute() {
|
|||
}
|
||||
|
||||
func init() {
|
||||
logger = slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{
|
||||
Level: slog.LevelDebug,
|
||||
}))
|
||||
logger = slog.New(
|
||||
tint.NewHandler(os.Stderr, &tint.Options{
|
||||
Level: slog.LevelDebug,
|
||||
TimeFormat: time.RFC3339,
|
||||
}),
|
||||
)
|
||||
|
||||
slog.SetDefault(logger)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue