Skip to content

Commit

Permalink
Fix sig
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed May 11, 2023
1 parent 3659656 commit 9d0cf7f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,18 @@ func Execute() {
}

func setLogger(verbose bool) {
logger := slog.New(slog.NewTextHandler(io.Discard))
logger := slog.New(slog.NewTextHandler(io.Discard, nil))
switch {
case os.Getenv("DEBUG") != "" || os.Getenv("ACTIONS_STEP_DEBUG") != "":
logger = slog.New(slog.HandlerOptions{
logger = slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{
AddSource: true,
Level: slog.LevelDebug,
}.NewTextHandler(os.Stderr))
}))
case verbose:
logger = slog.New(slog.HandlerOptions{
logger = slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{
AddSource: false,
Level: slog.LevelInfo,
}.NewTextHandler(os.Stderr))
}))
}
slog.SetDefault(logger)
}
Expand Down

0 comments on commit 9d0cf7f

Please sign in to comment.