Add hint message only if rule matches

This commit is contained in:
Jan Eitzinger 2025-05-26 13:36:23 +02:00
parent 8d6ae85b0d
commit 0261c263f9

View File

@ -277,9 +277,6 @@ func (t *JobClassTagger) Match(job *schema.Job) {
if !r.HasTag(id, t.tagType, tag) {
r.AddTagOrCreateDirect(id, t.tagType, tag)
}
} else {
log.Info("Rule does not match!")
}
// process hint template
var msg bytes.Buffer
@ -290,5 +287,8 @@ func (t *JobClassTagger) Match(job *schema.Job) {
// FIXME: Handle case where multiple tags apply
r.UpdateMetadata(job, "message", msg.String())
} else {
log.Info("Rule does not match!")
}
}
}