orm
orm copied to clipboard
set logger to all drivers via `DBAL->setLogger()`
The DatabaseManager class uses the LoggerTrait trait
He has the setLogger($logger) method
If i want to log SQL queries then i call setLogger() method on DatabaseManager object
But all existing drivers do not recieve LoggerInterface because drivers were created when created the DatabaseManager instance
It would be great if instead of this code:
foreach ($dbal->getDrivers() as $driver) {
$driver->setLogger($this->logger);
}
... i could use this:
$dbal->setLogger($this->logger);
I would greatly appreciate any help with it.
See spiral/database
Can be unresolved because this test cases do fail And this code is still actual