diff --git a/agent/agent.go b/agent/agent.go index 7bd6b108d..8dbbffa82 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -196,28 +196,28 @@ func (a *Agent) initPlugins() error { err := processor.Init() if err != nil { return fmt.Errorf("could not initialize processor %s: %v", - processor.Config.Name, err) + processor.LogName(), err) } } for _, aggregator := range a.Config.Aggregators { err := aggregator.Init() if err != nil { return fmt.Errorf("could not initialize aggregator %s: %v", - aggregator.Config.Name, err) + aggregator.LogName(), err) } } for _, processor := range a.Config.AggProcessors { err := processor.Init() if err != nil { return fmt.Errorf("could not initialize processor %s: %v", - processor.Config.Name, err) + processor.LogName(), err) } } for _, output := range a.Config.Outputs { err := output.Init() if err != nil { return fmt.Errorf("could not initialize output %s: %v", - output.Config.Name, err) + output.LogName(), err) } } return nil