events: updated logging for ignored events.

This commit is contained in:
Marcin Kuzminski 2019-01-18 13:32:26 +01:00
parent efc39f31eb
commit fbf51b7e76
3 changed files with 12 additions and 6 deletions

View file

@ -122,8 +122,10 @@ class HipchatIntegrationType(IntegrationTypeBase, CommitParsingDataHandler):
log.debug('event not valid: %r', event)
return
if event.name not in self.settings['events']:
log.debug('event ignored: %r', event)
allowed_events = self.settings['events']
if event.name not in allowed_events:
log.debug('event ignored: %r event %s not in allowed events %s',
event, event.name, allowed_events)
return
data = event.as_dict()

View file

@ -138,8 +138,10 @@ class SlackIntegrationType(IntegrationTypeBase, CommitParsingDataHandler):
log.debug('event not valid: %r', event)
return
if event.name not in self.settings['events']:
log.debug('event ignored: %r', event)
allowed_events = self.settings['events']
if event.name not in allowed_events:
log.debug('event ignored: %r event %s not in allowed events %s',
event, event.name, allowed_events)
return
data = event.as_dict()

View file

@ -170,8 +170,10 @@ class WebhookIntegrationType(IntegrationTypeBase):
log.debug('event not valid: %r', event)
return
if event.name not in self.settings['events']:
log.debug('event ignored: %r', event)
allowed_events = self.settings['events']
if event.name not in allowed_events:
log.debug('event ignored: %r event %s not in allowed events %s',
event, event.name, allowed_events)
return
data = event.as_dict()