Bug 15714: Remove zebra.log and add loglevels
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 2 Feb 2016 15:40:06 +0000 (16:40 +0100)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Wed, 24 Feb 2016 03:38:18 +0000 (03:38 +0000)
commit741252362450aedc8903ef75658b4c5342f8e6f9
tree20cef04f0821bd0c9aaba55cc0f6203b32964192
parentdbb24a676e8a8d96f20a9c1c66fdf5fd08ba1d4c
Bug 15714: Remove zebra.log and add loglevels

The file zebra.log is actually not used, because daemon's --output
parameter sends all message to zebra-output (making that stdout
goes there too and --stdout does nothing). We do not need any
differentiation (if any at all) here; behavior does not change.

Note: zebra-error will only contain the daemon's error messages and not
the zebra error messages! So you will probably only find messages about
stopping zebra in zebra-error.

The loglevels are by default none,fatal,warn and can be changed via the
zebra_loglevels config variable (read by koha-functions.sh). If you remove
'none', you will have request-messages in the log. You can also keep 'none'
and add 'request' to achieve something similar (undocumented however).

Some of the parameters passed to daemon when stopping zebra are
superfluous and have been removed.

Test plan:
[1] Remove the file zebra.log. Look at last lines in zebra-error and
    zebra-output.
[2] Remove zebra_loglevels from koha-conf (if present).
    Start/restart Zebra. Search to verify if Zebra runs.
    Stop Zebra and check zebra-error for a new line (killed by signal 15).
[3] Add fatal,warn in koha-conf:zebra_loglevels (do not include 'none').
    Start Zebra. Check zebra-output for a line "[log] zebra_start".
    Do a search and check zebra-output for lines with "[request]".
[4] Verify that zebra.log did not appear again.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
debian/scripts/koha-start-zebra
debian/scripts/koha-stop-zebra