add plugin.name to error message
This commit is contained in:
parent
c2d71f4c27
commit
cb5c0c5147
4
agent.go
4
agent.go
|
@ -181,7 +181,7 @@ func (a *Agent) crankParallel() error {
|
||||||
|
|
||||||
err := plugin.plugin.Gather(&acc)
|
err := plugin.plugin.Gather(&acc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Error in plugins: %s", err)
|
log.Printf("Error in plugin [%s]: %s", plugin.name, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
points <- &acc
|
points <- &acc
|
||||||
|
@ -338,7 +338,7 @@ func (a *Agent) Run(shutdown chan struct{}) error {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
err := a.crankSeparate(shutdown, plugin)
|
err := a.crankSeparate(shutdown, plugin)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Error in plugins: %s", err)
|
log.Printf("Error in plugin [%s]: %s", plugin.name, err)
|
||||||
}
|
}
|
||||||
}(plugin)
|
}(plugin)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue