Skip to content

Commit

Permalink
fix: add err parameter for log.Warnf
Browse files Browse the repository at this point in the history
Signed-off-by: ziidu <ziidu@outlook.com>
  • Loading branch information
ziidu authored and MandssS committed Jul 25, 2023
1 parent 8f493cf commit 84201f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exec/jvm/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package jvm
import (
"context"
"fmt"
"github.com/chaosblade-io/chaosblade-spec-go/log"
"os"
osuser "os/user"
"path"
Expand All @@ -28,6 +27,7 @@ import (
"time"

"github.com/chaosblade-io/chaosblade-spec-go/channel"
"github.com/chaosblade-io/chaosblade-spec-go/log"
"github.com/chaosblade-io/chaosblade-spec-go/spec"
"github.com/chaosblade-io/chaosblade-spec-go/util"
"github.com/shirou/gopsutil/process"
Expand Down Expand Up @@ -213,7 +213,7 @@ func getJavaCommandLine(ctx context.Context, pid string) (commandSlice []string,
}
processObj, err := process.NewProcess(int32(processId))
if err != nil {
log.Warnf(ctx, "new process by processId err: %v, pid: %s", pid)
log.Warnf(ctx, "new process by processId err, pid %s, err: %v", pid, err)
return nil, err
}
return processObj.CmdlineSlice()
Expand Down

0 comments on commit 84201f8

Please sign in to comment.