def on_config_modified_event(event): # Handling for theme change being triggered. try: if 'IThemeSettings' in event.record.__name__: on_theme_event(event) else: audit.event(event) except Exception: logger.warn('Event %s unable to be logged.' % event.record.__name__)
def on_pas_event(event): audit.event(event)
def on_cache_invalidated(obj): audit.event(obj)
def on_trash_emptied(obj): audit.event(obj)
def on_theme_event(event): # Prevents theme change from logging several times if 'currentTheme' in event.record.__name__: audit.event(event)
def on_object_event(obj, event): if IRelationBrokenEvent.providedBy(event): # these trigger too much! return audit.event(obj, event)
def onPASEvent(event): audit.event(event)