19 lines
250 B
Go
19 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,
|
||
|
}))
|
||
|
}
|