Skip to content

Commit 3c53386

Browse files
committed
Can log things to DB, even if not logging SQL queries to file #8635
The middleware is unconditionally enabled, so it can notify the DbHandler whenever we get an active connection. However, the middleware may or may not log SQL queries to files. This is controlled via the new config key `logSql`.
1 parent 9389c82 commit 3c53386

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/development.config.php.dist

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ use Laminas\ConfigAggregator\ConfigAggregator;
2828
return [
2929
'debug' => true,
3030
ConfigAggregator::ENABLE_CACHE => false,
31+
'logSql' => true, // Log all SQL queries from Doctrine (to logs/all.log)
3132
'doctrine' => [
3233
'configuration' => [
3334
'orm_default' => [
34-
// Log all SQL queries from Doctrine (to logs/all.log)
35-
'middlewares' => [Ecodev\Felix\DBAL\Logging\Middleware::class],
3635
'generate_proxies' => true,
3736
],
3837
],

0 commit comments

Comments
 (0)