godash/pkg/logger/logger.go

19 lines
250 B
Go
Raw Normal View History

2024-09-30 12:05:12 +02:00
package logger
import (
"log/slog"
"os"
"time"
"github.com/lmittmann/tint"
)
func NewLogger() *slog.Logger {
w := os.Stderr
return slog.New(tint.NewHandler(w, &tint.Options{
Level: slog.LevelDebug,
TimeFormat: time.Kitchen,
}))
}