Bug 15714: Add get_loglevels to koha-functions.sh
Preparing for including different log levels in koha-start-zebra.
Note that the default response is none,fatal,warn; this is equal
to the options passed to zebrasrv in koha-start-zebra (for now).
Test plan:
[1] Run on the command line: source koha-functions.sh
[2] Type get_loglevels [your_instance]
By default, you should see: none,fatal,warn
[3] Add this line to your koha-conf:
<zebra_loglevels>how,are,you</zebra_loglevels>
[4] Run get_loglevels [your_instance] again.
Remove the nonsense log levels 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
This commit is contained in:
parent
e51fe4a8f1
commit
dbb24a676e
|
|
@ -159,3 +159,15 @@ get_instances()
|
|||
find /etc/koha/sites -mindepth 1 -maxdepth 1\
|
||||
-type d -printf '%f\n' | sort
|
||||
}
|
||||
|
||||
get_loglevels()
|
||||
{
|
||||
local instancename=$1
|
||||
local retval=$(xmlstarlet sel -t -v 'yazgfs/config/zebra_loglevels' /etc/koha/sites/$instancename/koha-conf.xml)
|
||||
if [ "$retval" != "" ]; then
|
||||
echo "$retval"
|
||||
else
|
||||
echo "none,fatal,warn"
|
||||
fi
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue