Skip to content

Commit

Permalink
Merge pull request #42 from hengyoush/feature/log-config
Browse files Browse the repository at this point in the history
[Improvement] improve log
  • Loading branch information
hengyoush authored Sep 15, 2024
2 parents 325bcb7 + 59eaa26 commit 51d4d8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion agent/conn/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,10 @@ func (p *Processor) run() {
} else if conn != nil && conn.Protocol == bpf.AgentTrafficProtocolTKProtocolUnset {
conn.AddSyscallEvent(event)
common.BPFEventLog.Debugf("[syscall][protocol unset][len=%d]%s | %s", event.SyscallEvent.BufSize, conn.ToString(), string(event.Buf))
} else if conn != nil && conn.Protocol == bpf.AgentTrafficProtocolTKProtocolUnknown {
common.BPFEventLog.Debugf("[syscall][protocol unknown][len=%d]%s | %s", event.SyscallEvent.BufSize, conn.ToString(), string(event.Buf))
} else {
common.BPFEventLog.Debugf("[syscall][lost][tgid=%d fd=%d][len=%d] %s", tgidFd>>32, uint32(tgidFd), event.SyscallEvent.BufSize, string(event.Buf))
common.BPFEventLog.Debugf("[syscall][no conn][tgid=%d fd=%d][len=%d] %s", tgidFd>>32, uint32(tgidFd), event.SyscallEvent.BufSize, string(event.Buf))
}
case event := <-p.kernEvents:
tgidFd := event.ConnIdS.TgidFd
Expand Down

0 comments on commit 51d4d8a

Please sign in to comment.