Skip to content

Commit

Permalink
fix(definitions): debug shows wrong logs for sig events
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaeldtinoco committed Oct 25, 2023
1 parent 6b25341 commit d381dd8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/events/definition_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ func (d *DefinitionGroup) GetDefinitions() []Definition {
func (d *DefinitionGroup) GetDefinitionIDByName(givenName string) (ID, bool) {
d.mutex.RLock()
defer d.mutex.RUnlock()
return d.getDefinitionIDByName(givenName)
id, found := d.getDefinitionIDByName(givenName)
if !found {
logger.Debugw("definition name not found", "name", givenName)
}
return id, found
}

// getDefinitionIDByName returns a definition ID by its name (no locking).
Expand All @@ -70,7 +74,6 @@ func (d *DefinitionGroup) getDefinitionIDByName(givenName string) (ID, bool) {
return id, true
}
}
logger.Debugw("definition name not found", "name", givenName)

return Undefined, false
}
Expand Down

0 comments on commit d381dd8

Please sign in to comment.