Skip to content

Commit

Permalink
Improving logs
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Schendel <[email protected]>
  • Loading branch information
amitschendel committed Dec 25, 2024
1 parent 65cc255 commit 142d9c8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/containerwatcher/v1/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (ch *IGContainerWatcher) execEventCallback(event *tracerexectype.Event) {

execEvent := &events.ExecEvent{Event: *event}
ch.enrichEvent(execEvent, []uint64{SYS_FORK})
logger.L().Info("exec info", helpers.Int("pid", int(event.Pid)), helpers.Int("tid", int(event.Tid)), helpers.String("comm", event.Comm))
logger.L().Info("parent exec info", helpers.Int("ppid", int(event.Ppid)), helpers.Int("tid", int(event.Ppid)), helpers.String("comm", event.Comm))

if event.Retval > -1 && event.Comm != "" {
ch.execWorkerChan <- execEvent
Expand Down
3 changes: 0 additions & 3 deletions pkg/ebpf/events/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ func (event *ExecEvent) GetExtra() interface{} {
return event.extra
}

// func (event *ExecEvent) GetPID() uint64 {
// return (uint64(event.Pid) << 32) | uint64(event.Tid)
// }
func (event *ExecEvent) GetPID() uint64 {
return (uint64(event.Ppid) << 32) | uint64(event.Ppid)
}

0 comments on commit 142d9c8

Please sign in to comment.