summaryrefslogtreecommitdiff
path: root/app/ServiceProvider
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-10-02 22:14:01 -0400
committerFrederic Guillot <fred@kanboard.net>2015-10-02 22:14:01 -0400
commit4a26dffaaf9103bc3615c338d235285338d38d6b (patch)
tree7c1d17ace1f51bc454934e981049b87f1581eb53 /app/ServiceProvider
parent216ec2f01f87832f5a9c6b72b2d1656b02412318 (diff)
Add config parameter to enable/disable Syslog
Diffstat (limited to 'app/ServiceProvider')
-rw-r--r--app/ServiceProvider/LoggingProvider.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/ServiceProvider/LoggingProvider.php b/app/ServiceProvider/LoggingProvider.php
index dd79d654..16fa6cec 100644
--- a/app/ServiceProvider/LoggingProvider.php
+++ b/app/ServiceProvider/LoggingProvider.php
@@ -13,11 +13,13 @@ class LoggingProvider implements ServiceProviderInterface
{
public function register(Container $container)
{
- $syslog = new Syslog('kanboard');
- $syslog->setLevel(LogLevel::ERROR);
-
$logger = new Logger;
- $logger->setLogger($syslog);
+
+ if (ENABLE_SYSLOG) {
+ $syslog = new Syslog('kanboard');
+ $syslog->setLevel(LogLevel::ERROR);
+ $logger->setLogger($syslog);
+ }
if (DEBUG) {
$logger->setLogger(new File(DEBUG_FILE));