Bug 20079: Display stack trace for development installations
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 23 Jan 2018 18:54:41 +0000 (15:54 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 18 Jul 2018 17:00:20 +0000 (17:00 +0000)
"""The default value is development, which causes plackup to
load the middleware components: AccessLog, StackTrace, and Lint unless
--no-default-middleware is set."""

Test plan:
Confirm that the stack trace is displayed when something is wrong (die somewhere to test)
for dev installations (inside a devbox)
The -E flag must remain deployment for non-dev installs

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
debian/scripts/koha-plack

index 1677ee0..68f8991 100755 (executable)
@@ -93,6 +93,11 @@ start_plack()
              --error-log /var/log/koha/${instancename}/plack-error.log"
     max_requests_and_workers="--max-requests ${PLACK_MAX_REQUESTS} --workers ${PLACK_WORKERS}"
 
+    if [ "$DEV_INSTALL" = "1" ]; then
+        # Maybe we should switch off debug_mode if DEV_INSTALL is not set?
+        environment="development"
+    fi
+
     if [ "$debug_mode" = "yes" ]; then
         environment="development"
         daemonize=""