Skip to content

Commit

Permalink
Merge pull request #1723 from hjr265/master
Browse files Browse the repository at this point in the history
cli: override log output from d2cli only
  • Loading branch information
gavin-ts authored Dec 1, 2023
2 parents be07c94 + 39d3d47 commit 3edfaa4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions d2cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1358,3 +1358,7 @@ func AnimatePNGs(ms *xmain.State, pngs [][]byte, animIntervalMs int) ([]byte, er

return xgif.AnimatePNGs(pngs, animIntervalMs)
}

func init() {
ctxlog.Init()
}
2 changes: 1 addition & 1 deletion lib/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand Down

0 comments on commit 3edfaa4

Please sign in to comment.