godash/pkg/logger/logger.go

18 lines
250 B
Go

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,
}))
}