Add debug logging for SQL query execution during export process

This commit is contained in:
Julien Fastré 2025-06-17 14:25:57 +02:00
parent 110a2e894f
commit 4206d17345
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB

View File

@ -92,6 +92,9 @@ final readonly class ExportGenerator
$this->logger->notice('[export] will execute this qb in export', [ $this->logger->notice('[export] will execute this qb in export', [
'dql' => $query->getDQL(), 'dql' => $query->getDQL(),
]); ]);
$this->logger->debug('[export] will execute this sql qb in export', [
'sql' => $query->getQuery()->getSQL(),
]);
} else { } else {
throw new \UnexpectedValueException('The method `intiateQuery` should return a `\Doctrine\ORM\NativeQuery` or a `Doctrine\ORM\QueryBuilder` object.'); throw new \UnexpectedValueException('The method `intiateQuery` should return a `\Doctrine\ORM\NativeQuery` or a `Doctrine\ORM\QueryBuilder` object.');
} }