mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
new: added debug callback to the network package
This commit is contained in:
parent
058a6865ff
commit
e50eaad7e6
3 changed files with 18 additions and 0 deletions
|
@ -209,6 +209,10 @@ func (s *Session) Register(mod Module) error {
|
|||
func (s *Session) Start() error {
|
||||
var err error
|
||||
|
||||
network.Debug = func(format string, args ...interface{}) {
|
||||
s.Events.Log(log.DEBUG, format, args...)
|
||||
}
|
||||
|
||||
// make sure modules are always sorted by name
|
||||
sort.Slice(s.Modules, func(i, j int) bool {
|
||||
return s.Modules[i].Name() < s.Modules[j].Name()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue