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:
evilsocket 2018-02-15 20:48:34 +01:00
parent 09808be1a4
commit 21236c257e
3 changed files with 58 additions and 1 deletions

View file

@ -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()