summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--app/ServiceProvider/LoggingProvider.php10
-rw-r--r--app/constants.php3
-rw-r--r--config.default.php3
-rw-r--r--doc/config.markdown9
5 files changed, 22 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 0e36e9d5..425b3403 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -57,6 +57,7 @@ Version 1.0.18
New features:
+* Add config parameter to enable/disable Syslog
* Include documentation in the application
* Add Gitlab authentication
* Add users and categories filters on the board
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));
diff --git a/app/constants.php b/app/constants.php
index 47e14c9e..f54930ab 100644
--- a/app/constants.php
+++ b/app/constants.php
@@ -94,6 +94,9 @@ defined('ENABLE_HSTS') or define('ENABLE_HSTS', true);
// Enable or disable "X-Frame-Options: DENY" HTTP header
defined('ENABLE_XFRAME') or define('ENABLE_XFRAME', true);
+// Syslog
+defined('ENABLE_SYSLOG') or define('ENABLE_SYSLOG', true);
+
// Default files directory
defined('FILES_DIR') or define('FILES_DIR', 'data/files/');
diff --git a/config.default.php b/config.default.php
index e3c6116d..0d94686a 100644
--- a/config.default.php
+++ b/config.default.php
@@ -192,6 +192,9 @@ define('ENABLE_HSTS', true);
// Enable or disable "X-Frame-Options: DENY" HTTP header
define('ENABLE_XFRAME', true);
+// Enable syslog logging
+define('ENABLE_SYSLOG', true);
+
// Escape html inside markdown text
define('MARKDOWN_ESCAPE_HTML', true);
diff --git a/doc/config.markdown b/doc/config.markdown
index 59302b4d..2cbd89e4 100644
--- a/doc/config.markdown
+++ b/doc/config.markdown
@@ -223,6 +223,15 @@ define('ENABLE_HSTS', true);
define('ENABLE_XFRAME', true);
```
+Logging
+-------
+
+```php
+// Enable syslog logging
+// Set to false to disable syslog
+define('ENABLE_SYSLOG', true);
+```
+
Bruteforce protection
---------------------