mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 10:46:57 -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
|
@ -3,7 +3,6 @@ package ticker
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/bettercap/bettercap/log"
|
||||
"github.com/bettercap/bettercap/session"
|
||||
)
|
||||
|
||||
|
@ -79,7 +78,7 @@ func (t *Ticker) Start() error {
|
|||
}
|
||||
|
||||
return t.SetRunning(true, func() {
|
||||
log.Info("ticker running with period %.fs.", t.Period.Seconds())
|
||||
t.Info("running with period %.fs", t.Period.Seconds())
|
||||
tick := time.NewTicker(t.Period)
|
||||
for range tick.C {
|
||||
if !t.Running() {
|
||||
|
@ -88,7 +87,7 @@ func (t *Ticker) Start() error {
|
|||
|
||||
for _, cmd := range t.Commands {
|
||||
if err := t.Session.Run(cmd); err != nil {
|
||||
log.Error("%s", err)
|
||||
t.Error("%s", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue