Skip to content

Commit

Permalink
print error if failed to load input configs
Browse files Browse the repository at this point in the history
  • Loading branch information
UlricQin committed Jul 11, 2022
1 parent 7077004 commit 4c86cfd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion agent/metrics_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ func (a *Agent) startMetricsAgent() error {
// construct input instance
inp := creator()
// set configurations for input instance
cfg.LoadConfigs(path.Join(config.Config.ConfigDir, inputFilePrefix+name), inp)
err = cfg.LoadConfigs(path.Join(config.Config.ConfigDir, inputFilePrefix+name), inp)
if err != nil {
log.Println("E! failed to load configuration of plugin:", name, "error:", err)
continue
}

if err = inp.Init(); err != nil {
if !errors.Is(err, types.ErrInstancesEmpty) {
Expand Down

0 comments on commit 4c86cfd

Please sign in to comment.