add plugin.name to error message

This commit is contained in:
nsvarich 2015-08-24 11:25:15 -06:00
parent c2d71f4c27
commit cb5c0c5147
1 changed files with 2 additions and 2 deletions

View File

@ -181,7 +181,7 @@ func (a *Agent) crankParallel() error {
err := plugin.plugin.Gather(&acc)
if err != nil {
log.Printf("Error in plugins: %s", err)
log.Printf("Error in plugin [%s]: %s", plugin.name, err)
}
points <- &acc
@ -338,7 +338,7 @@ func (a *Agent) Run(shutdown chan struct{}) error {
defer wg.Done()
err := a.crankSeparate(shutdown, plugin)
if err != nil {
log.Printf("Error in plugins: %s", err)
log.Printf("Error in plugin [%s]: %s", plugin.name, err)
}
}(plugin)
}