fix: add rule id to malformed configuration log error
@@ -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.")
}
}
