add plugin.name to error message

This commit is contained in:
nsvarich 2015-08-24 11:25:15 -06:00 committed by Cameron Sparr
parent afe366d6b7
commit f45f7e56fd
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)
}