Log plugin errors in crankParallel and crankSeparate cases. Previously errors weren't logged in these cases.
This commit is contained in:
parent
3d05575e9d
commit
d0797b7f38
11
agent.go
11
agent.go
|
@ -179,7 +179,11 @@ func (a *Agent) crankParallel() error {
|
||||||
acc.Prefix = plugin.name + "_"
|
acc.Prefix = plugin.name + "_"
|
||||||
acc.Config = plugin.config
|
acc.Config = plugin.config
|
||||||
|
|
||||||
plugin.plugin.Gather(&acc)
|
err := plugin.plugin.Gather(&acc)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("Error in plugins: %s", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
points <- &acc
|
points <- &acc
|
||||||
}(plugin)
|
}(plugin)
|
||||||
|
@ -333,7 +337,10 @@ func (a *Agent) Run(shutdown chan struct{}) error {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func(plugin *runningPlugin) {
|
go func(plugin *runningPlugin) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
a.crankSeparate(shutdown, plugin)
|
err := a.crankSeparate(shutdown, plugin)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("Error in plugins: %s", err)
|
||||||
|
}
|
||||||
}(plugin)
|
}(plugin)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue