From 87b14d2085c897703aea2a1925a1636d32088575 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Sat, 4 Jun 2016 09:45:32 +0200 Subject: [PATCH] Bug 16661: Plack: Enable and differentiate logging in misc/plack/plackup.sh Content-Type: text/plain; charset=utf-8 This is only about the plackup.sh script in misc. Currently logging is disabled by default. I would prefer to enable by default. Also logging does not differentiate between opac and intranet. It should. Test plan: Run plackup.sh for opac and intranet. Verify that access and error logs are used as you would expect. --- misc/plack/plackup.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/misc/plack/plackup.sh b/misc/plack/plackup.sh index 2c7f599..603aa5b 100755 --- a/misc/plack/plackup.sh +++ b/misc/plack/plackup.sh @@ -37,8 +37,12 @@ else fi export INTRANET # pass to plack -# uncomment to enable logging -#opt="$opt --access-log $LOGDIR/opac-access.log --error-log $LOGDIR/opac-error.log" +# comment to disable logging +if [ "$INTRANET" -eq "0" ]; then + opt="$opt --access-log $LOGDIR/opac-access.log --error-log $LOGDIR/opac-error.log" +else + opt="$opt --access-log $LOGDIR/intranet-access.log --error-log $LOGDIR/intranet-error.log" +fi # --max-requests 50 decreased from 1000 to keep memory usage sane # --workers 4 number of cores on machine -- 1.7.10.4