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
|
@ -7,7 +7,6 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/bettercap/bettercap/log"
|
||||
"github.com/bettercap/bettercap/session"
|
||||
|
||||
"github.com/evilsocket/islazy/fs"
|
||||
|
@ -263,9 +262,9 @@ func (s *EventsStream) Show(limit int) error {
|
|||
|
||||
func (s *EventsStream) startWaitingFor(tag string, timeout int) error {
|
||||
if timeout == 0 {
|
||||
log.Info("waiting for event %s ...", tui.Green(tag))
|
||||
s.Info("waiting for event %s ...", tui.Green(tag))
|
||||
} else {
|
||||
log.Info("waiting for event %s for %d seconds ...", tui.Green(tag), timeout)
|
||||
s.Info("waiting for event %s for %d seconds ...", tui.Green(tag), timeout)
|
||||
go func() {
|
||||
time.Sleep(time.Duration(timeout) * time.Second)
|
||||
s.waitFor = ""
|
||||
|
@ -279,7 +278,7 @@ func (s *EventsStream) startWaitingFor(tag string, timeout int) error {
|
|||
if event == nil {
|
||||
return fmt.Errorf("'events.waitFor %s %d' timed out.", tag, timeout)
|
||||
} else {
|
||||
log.Debug("got event: %v", event)
|
||||
s.Debug("got event: %v", event)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -2,7 +2,6 @@ package events_stream
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/bettercap/bettercap/modules/net_sniff"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
@ -10,6 +9,7 @@ import (
|
|||
"github.com/bettercap/bettercap/network"
|
||||
"github.com/bettercap/bettercap/session"
|
||||
|
||||
"github.com/bettercap/bettercap/modules/net_sniff"
|
||||
"github.com/bettercap/bettercap/modules/syn_scan"
|
||||
|
||||
"github.com/google/go-github/github"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue