Feat: Implement logging database handler

This commit is contained in:
Björn Fromme
2023-10-21 15:16:28 +02:00
parent cc93a0be0c
commit bf2e5600d0
9 changed files with 87 additions and 21 deletions
@@ -28,7 +28,7 @@ class DeleteController extends AbstractController
$this->addFlash('success', 'Die Bewerbung wurde gelöscht');
$this->logger->info('Delete application', [
'application_id' => $application->getId(),
'destination' => (string) $application->getAssignment()->getDestination(),
'teamer' => (string) $application->getTeamer(),
]);
@@ -28,12 +28,10 @@ class DisposeController extends AbstractController
$this->entityManager->persist($disposition);
$this->entityManager->remove($application);
$this->entityManager->flush();
$this->addFlash('success', 'Der Teamer wurde eingeteilt');
$this->logger->info('Create disposition', [
'application_id' => $application->getId(),
'disposition_id' => $disposition->getId(),
'teamer' => (string) $application->getTeamer(),
]);
@@ -47,15 +47,15 @@ class DeleteController extends AbstractController
if ($form->isSubmitted() && $form->isValid()) {
$this->eventDispatcher->dispatch(new DispositionDeletedEvent($disposition), DispositionDeletedEvent::NAME);
$this->entityManager->remove($disposition);
$this->entityManager->flush();
$this->addFlash('success', 'Die Einteilung wurde gelöscht');
$this->logger->info('Delete disposition', [
'disposition_id' => $disposition->getId(),
'teamer' => (string) $disposition->getTeamer(),
]);
$this->entityManager->remove($disposition);
$this->entityManager->flush();
$response->setCloseAndRedirect($this->generateUrl('app_admin_assignment_detail', [
'uuid' => $disposition->getAssignment()->getUuid(),
]));