Skip to content

Commit

Permalink
fix: add rule id to malformed configuration log error (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
hefekranz authored Mar 25, 2020
1 parent 32b6059 commit 7688a8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rule/repository_memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ func (m *RepositoryMemory) Set(ctx context.Context, rules []Rule) error {
for _, check := range rules {
if err := m.r.RuleValidator().Validate(&check); err != nil {
viperx.LoggerWithValidationErrorFields(m.r.Logger(), err).WithError(err).
Errorf("A rule uses a malformed configuration and all URLs matching this rule will not work. You should resolve this issue now.")
WithField("rule_id", check.ID).
Errorf("A Rule uses a malformed configuration and all URLs matching this rule will not work. You should resolve this issue now.")
}
}

Expand Down

0 comments on commit 7688a8d

Please sign in to comment.