summaryrefslogtreecommitdiff
path: root/app/ServiceProvider
diff options
context:
space:
mode:
Diffstat (limited to 'app/ServiceProvider')
-rw-r--r--app/ServiceProvider/DatabaseProvider.php1
-rw-r--r--app/ServiceProvider/LoggingProvider.php7
2 files changed, 6 insertions, 2 deletions
diff --git a/app/ServiceProvider/DatabaseProvider.php b/app/ServiceProvider/DatabaseProvider.php
index 2ed87ace..632b0238 100644
--- a/app/ServiceProvider/DatabaseProvider.php
+++ b/app/ServiceProvider/DatabaseProvider.php
@@ -11,6 +11,7 @@ class DatabaseProvider implements ServiceProviderInterface
public function register(Container $container)
{
$container['db'] = $this->getInstance();
+ $container['db']->stopwatch = DEBUG;
}
/**
diff --git a/app/ServiceProvider/LoggingProvider.php b/app/ServiceProvider/LoggingProvider.php
index 93f55a9c..f5e70381 100644
--- a/app/ServiceProvider/LoggingProvider.php
+++ b/app/ServiceProvider/LoggingProvider.php
@@ -13,8 +13,11 @@ class LoggingProvider implements ServiceProviderInterface
public function register(Container $container)
{
$logger = new Logger('app');
- $logger->pushHandler(new StreamHandler(__DIR__.'/../../data/debug.log', Logger::DEBUG));
- $logger->pushHandler(new SyslogHandler('kanboard', LOG_USER, Logger::DEBUG));
+ $logger->pushHandler(new SyslogHandler('kanboard', LOG_USER, Logger::INFO));
+
+ if (DEBUG) {
+ $logger->pushHandler(new StreamHandler(__DIR__.'/../../data/debug.log', Logger::DEBUG));
+ }
$container['logger'] = $logger;
}