summaryrefslogtreecommitdiff
path: root/app/ServiceProvider/DatabaseProvider.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-14 22:19:10 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-14 22:19:10 -0400
commit68c087e85cb1678172478d67d106c239ccb2d878 (patch)
tree870c61bc7eb86690f731b189dcdca431b8c1f86a /app/ServiceProvider/DatabaseProvider.php
parente08b5efba958077ea764a74ea8c4ed6593d3c1c5 (diff)
Update PicoDb
Diffstat (limited to 'app/ServiceProvider/DatabaseProvider.php')
-rw-r--r--app/ServiceProvider/DatabaseProvider.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/ServiceProvider/DatabaseProvider.php b/app/ServiceProvider/DatabaseProvider.php
index 26662b8a..c0dcd366 100644
--- a/app/ServiceProvider/DatabaseProvider.php
+++ b/app/ServiceProvider/DatabaseProvider.php
@@ -20,8 +20,13 @@ class DatabaseProvider implements ServiceProviderInterface
public function register(Container $container)
{
$container['db'] = $this->getInstance();
- $container['db']->stopwatch = DEBUG;
- $container['db']->logQueries = DEBUG;
+
+ if (DEBUG) {
+ $container['db']->getStatementHandler()
+ ->withLogging()
+ ->withStopWatch()
+ ;
+ }
return $container;
}