Skip to content

Commit 49353b6

Browse files
committed
fix: coredump logger usage
1 parent 586fdee commit 49353b6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tools/coredump/analyze.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"errors"
1010
"flag"
1111
"fmt"
12+
"log/slog"
1213
"os"
1314
"strconv"
1415
"strings"
@@ -81,7 +82,9 @@ func (cmd *analyzeCmd) exec(context.Context, []string) (err error) {
8182
}
8283

8384
if cmd.debugLog {
84-
log.SetLevel(log.DebugLevel)
85+
log.SetLogger(*slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{
86+
Level: slog.LevelDebug,
87+
})))
8588
}
8689

8790
var proc process.Process

tools/coredump/main.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ import (
2020
)
2121

2222
func main() {
23-
log.SetReportCaller(false)
24-
log.SetFormatter(&log.TextFormatter{})
25-
2623
cloudClient, err := cloudstore.Client()
2724
if err != nil {
2825
log.Fatalf("%v", err)

0 commit comments

Comments
 (0)