mirror of
https://github.com/bettercap/bettercap
synced 2025-07-07 13:32:07 -07:00
refact: centralized logging into log package using Session singleton instance
This commit is contained in:
parent
23ee1223a2
commit
e36bcacf00
11 changed files with 117 additions and 72 deletions
3
main.go
3
main.go
|
@ -6,6 +6,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/evilsocket/bettercap-ng/core"
|
||||
"github.com/evilsocket/bettercap-ng/log"
|
||||
"github.com/evilsocket/bettercap-ng/modules"
|
||||
"github.com/evilsocket/bettercap-ng/session"
|
||||
)
|
||||
|
@ -65,7 +66,7 @@ func main() {
|
|||
}
|
||||
|
||||
if err = sess.Run(line); err != nil {
|
||||
sess.Events.Log(session.ERROR, "%s", err)
|
||||
log.Error("%s", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue