summaryrefslogtreecommitdiff
path: root/app/constants.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/constants.php')
-rw-r--r--app/constants.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/constants.php b/app/constants.php
index b5b01960..6f30af7f 100644
--- a/app/constants.php
+++ b/app/constants.php
@@ -16,8 +16,13 @@ defined('FILES_DIR') or define('FILES_DIR', DATA_DIR.DIRECTORY_SEPARATOR.'files'
defined('PLUGINS_DIR') or define('PLUGINS_DIR', ROOT_DIR.DIRECTORY_SEPARATOR.'plugins');
// Enable/disable debug
-defined('DEBUG') or define('DEBUG', getenv('DEBUG'));
-defined('DEBUG_FILE') or define('DEBUG_FILE', getenv('DEBUG_FILE') ?: DATA_DIR.DIRECTORY_SEPARATOR.'debug.log');
+defined('DEBUG') or define('DEBUG', strtolower(getenv('DEBUG')) === 'true');
+
+// Logging drivers: syslog, stdout, stderr or file
+defined('LOG_DRIVER') or define('LOG_DRIVER', getenv('LOG_DRIVER'));
+
+// Logging file
+defined('LOG_FILE') or define('LOG_FILE', DATA_DIR.DIRECTORY_SEPARATOR.'debug.log');
// Application version
defined('APP_VERSION') or define('APP_VERSION', build_app_version('$Format:%d$', '$Format:%H$'));
@@ -96,9 +101,6 @@ 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', getenv('ENABLE_SYSLOG'));
-
// Escape html inside markdown text
defined('MARKDOWN_ESCAPE_HTML') or define('MARKDOWN_ESCAPE_HTML', true);