summaryrefslogtreecommitdiff
path: root/app/ServiceProvider/LoggingProvider.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/ServiceProvider/LoggingProvider.php')
-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));