From 0c4e01f9ed7be7be8f052bb42bf71cae967ea89e 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. Amended to use different file names for the plack logs, separate from the apache logs. Apache probably listens too and uses the other logs. Test plan: Run plackup.sh for opac and intranet. Verify that logfiles 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..20042b0 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/plack-opac.log --error-log $LOGDIR/plack-opac-error.log" +else + opt="$opt --access-log $LOGDIR/plack-intranet.log --error-log $LOGDIR/plack-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