Override log output from d2cli only

This commit is contained in:
Mahmud Ridwan 2023-11-11 09:31:51 +06:00
parent 3153662808
commit 39d3d4755a
No known key found for this signature in database
GPG key ID: 6138DFEA567F52B1
2 changed files with 5 additions and 1 deletions

View file

@ -1245,3 +1245,7 @@ func AnimatePNGs(ms *xmain.State, pngs [][]byte, animIntervalMs int) ([]byte, er
return xgif.AnimatePNGs(pngs, animIntervalMs)
}
func init() {
ctxlog.Init()
}

View file

@ -18,7 +18,7 @@ import (
var _default = slog.Make(sloghuman.Sink(os.Stderr)).Named("default")
func init() {
func Init() {
stdlib := slog.Stdlib(context.Background(), _default, slog.LevelInfo)
log.SetOutput(stdlib.Writer())
}