Skip to content

Commit

Permalink
Log rules errors as error
Browse files Browse the repository at this point in the history
Signed-off-by: Mathieu Corbin <[email protected]>
  • Loading branch information
mcorbin committed Apr 5, 2024
1 parent e4e67a2 commit cec0808
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/ruler/ruler.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ func (r *Ruler) Execute(ctx context.Context, ruleName string, project project.Pr
}
}
if len(errorMessages) > 0 {
for _, errorMessage := range errorMessages {
r.logger.Error(fmt.Sprintf("error on rule %s for project %s: %s", ruleName, project.Name, errorMessage))
}
return aggregates.RuleResult{
Success: false,
RuleName: ruleName,
Expand Down

0 comments on commit cec0808

Please sign in to comment.