misc: each module now has its own tagged logging

This commit is contained in:
evilsocket 2019-02-12 15:16:02 +01:00
commit 9cd4e380fb
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
47 changed files with 343 additions and 349 deletions

View file

@ -10,7 +10,6 @@ import (
golog "log"
"time"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/session"
@ -110,7 +109,7 @@ func (d *BLERecon) Configure() (err error) {
if d.Running() {
return session.ErrAlreadyStarted
} else if d.gattDevice == nil {
log.Info("Initializing BLE device ...")
d.Info("Initializing BLE device ...")
// hey Paypal GATT library, could you please just STFU?!
golog.SetOutput(ioutil.Discard)
@ -140,7 +139,7 @@ func (d *BLERecon) Start() error {
<-d.quit
log.Info("Stopping BLE scan ...")
d.Info("Stopping BLE scan ...")
d.gattDevice.StopScanning()
@ -156,7 +155,7 @@ func (d *BLERecon) Stop() error {
}
func (d *BLERecon) pruner() {
log.Debug("Started BLE devices pruner ...")
d.Debug("Started BLE devices pruner ...")
for d.Running() {
for _, dev := range d.Session.BLE.Devices() {
@ -193,7 +192,7 @@ func (d *BLERecon) enumAllTheThings(mac string) error {
return err
}
log.Info("Connecting to %s ...", mac)
d.Info("Connecting to %s ...", mac)
go func() {
time.Sleep(d.connTimeout)