mirror of
https://github.com/bettercap/bettercap
synced 2025-07-11 15:46:59 -07:00
new: -silent and -debug are now mapped to log.silent and log.debug that can be set at runtime (fixes #50).
This commit is contained in:
parent
09808be1a4
commit
21236c257e
3 changed files with 58 additions and 1 deletions
|
@ -54,6 +54,18 @@ func NewEventPool(debug bool, silent bool) *EventPool {
|
|||
}
|
||||
}
|
||||
|
||||
func (p *EventPool) SetSilent(s bool) {
|
||||
p.Lock()
|
||||
defer p.Unlock()
|
||||
p.silent = s
|
||||
}
|
||||
|
||||
func (p *EventPool) SetDebug(d bool) {
|
||||
p.Lock()
|
||||
defer p.Unlock()
|
||||
p.debug = d
|
||||
}
|
||||
|
||||
func (p *EventPool) Add(tag string, data interface{}) {
|
||||
p.Lock()
|
||||
defer p.Unlock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue