Resolve "Entity logging service / bundle" #1208

Open
korina.cordero wants to merge 35 commits from 330-entity-logging-service-bundle into master
2 changed files with 7 additions and 1 deletions
Showing only changes of commit 5b167ef680 - Show all commits

View file

@ -271,7 +271,7 @@ services:
arguments:
$token_storage: "@security.token_storage"
$log_db: '@influxdb_database'
$entities: ['App\Entity\User', 'App\Entity\Role']
$entities: ['App\Entity\User', 'App\Entity\Role', 'App\Entity\Partner']
tags:
- name: 'doctrine.event_listener'
event: 'onFlush'

View file

@ -53,6 +53,8 @@ class EntityListener
$this->writeToLogDB($object_class, $object->getID(), 'create', $fields, $user_id);
}
else
error_log($object_class . ' does not implement the AuditableEntity interface.');
}
}
@ -108,6 +110,8 @@ class EntityListener
$this->writeToLogDB($entity_class, $updated_entity->getID(), 'update', $fields, $user_id);
}
else
error_log($entity_class . ' does not implement the AuditableEntity interface.');
}
}
@ -130,6 +134,8 @@ class EntityListener
$this->writeToLogDB($entity_class, $deleted_id, 'delete', $fields, $user_id);
}
else
error_log($entity_class . ' does not implement the AuditableEntity interface.');
}
}