diff --git a/application/Espo/Core/ORM/ConfigDataProvider.php b/application/Espo/Core/ORM/ConfigDataProvider.php index 4fa37601d9..c59649ab8a 100644 --- a/application/Espo/Core/ORM/ConfigDataProvider.php +++ b/application/Espo/Core/ORM/ConfigDataProvider.php @@ -40,4 +40,9 @@ class ConfigDataProvider { return (bool) $this->config->get('logger.sql'); } + + public function logSqlFailed(): bool + { + return (bool) $this->config->get('logger.sqlFailed'); + } } diff --git a/application/Espo/Core/ORM/EntityManagerFactory.php b/application/Espo/Core/ORM/EntityManagerFactory.php index 14a1896fb5..8168126757 100644 --- a/application/Espo/Core/ORM/EntityManagerFactory.php +++ b/application/Espo/Core/ORM/EntityManagerFactory.php @@ -136,7 +136,7 @@ class EntityManagerFactory $pdoProvider, $this->log, $this->configDataProvider->logSql(), - $this->configDataProvider->logSql() + $this->configDataProvider->logSqlFailed() ); $binding = BindingContainerBuilder::create() diff --git a/application/Espo/Resources/defaults/config.php b/application/Espo/Resources/defaults/config.php index c281002520..9bc2ee2f54 100644 --- a/application/Espo/Resources/defaults/config.php +++ b/application/Espo/Resources/defaults/config.php @@ -84,6 +84,8 @@ return [ 'maxFileNumber' => 30, 'printTrace' => false, 'databaseHandler' => false, + 'sql' => false, + 'sqlFailed' => false, ], 'authenticationMethod' => 'Espo', 'globalSearchEntityList' => [