fix building log endpoints without error judge

This commit is contained in:
kongfei 2022-06-24 18:19:23 +08:00
parent b7d3925d53
commit 0d80ef5623
2 changed files with 7 additions and 0 deletions

View File

@ -154,6 +154,12 @@ func (a *Agent) startLogAgent() {
}
endpoints, err := BuildEndpoints(intakeTrackType, AgentJSONIntakeProtocol, logsconfig.DefaultIntakeOrigin)
if err != nil {
message := fmt.Sprintf("Invalid endpoints: %v", err)
status.AddGlobalError(invalidProcessingRules, message)
log.Println("E!", errors.New(message))
return
}
processingRules, err := GlobalProcessingRules()
if err != nil {
message := fmt.Sprintf("Invalid processing rules: %v", err)

View File

@ -100,6 +100,7 @@ EXIT:
}
}
ag.Stop()
log.Println("I! exited")
}