mirror of
https://github.com/bettercap/bettercap
synced 2025-08-21 05:53:20 -07:00
misc: each module now has its own tagged logging
This commit is contained in:
parent
9003be56ca
commit
9cd4e380fb
47 changed files with 343 additions and 349 deletions
|
@ -4,7 +4,6 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/bettercap/bettercap/log"
|
||||
"github.com/bettercap/bettercap/session"
|
||||
|
||||
"github.com/google/gopacket"
|
||||
|
@ -171,7 +170,7 @@ func (s *Sniffer) Start() error {
|
|||
s.pktSourceChan = src.Packets()
|
||||
for packet := range s.pktSourceChan {
|
||||
if !s.Running() {
|
||||
log.Debug("end pkt loop (pkt=%v filter='%s')", packet, s.Ctx.Filter)
|
||||
s.Debug("end pkt loop (pkt=%v filter='%s')", packet, s.Ctx.Filter)
|
||||
break
|
||||
}
|
||||
|
||||
|
@ -211,14 +210,14 @@ func (s *Sniffer) Start() error {
|
|||
|
||||
func (s *Sniffer) Stop() error {
|
||||
return s.SetRunning(false, func() {
|
||||
log.Debug("stopping sniffer")
|
||||
s.Debug("stopping sniffer")
|
||||
if s.pktSourceChan != nil {
|
||||
log.Debug("sending nil")
|
||||
s.Debug("sending nil")
|
||||
s.pktSourceChan <- nil
|
||||
log.Debug("nil sent")
|
||||
s.Debug("nil sent")
|
||||
}
|
||||
log.Debug("closing ctx")
|
||||
s.Debug("closing ctx")
|
||||
s.Ctx.Close()
|
||||
log.Debug("ctx closed")
|
||||
s.Debug("ctx closed")
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue