Bug 26310: Allow setting trace_to parameter in Elaasticsearch config
authorNick Clemens <nick@bywatersolutions.com>
Thu, 27 Aug 2020 15:24:58 +0000 (15:24 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 4 Nov 2020 11:59:33 +0000 (12:59 +0100)
commit55f2279314edf390e6257942a84f9f9b058c84cf
treed56d5396ddbfe8fa81f4dc3bed0491838e740cee
parente7c134e27e044ad4ebe9a0e4aa220f4a05208215
Bug 26310: Allow setting trace_to parameter in Elaasticsearch config

For debugging purposes we may wish to see the requests and responses made to
Elasticsearch

To test:
1 - prove -v t/Koha/SearchEngine/Elasticsearch.t
2 - Set <trace_to>Stderr</trace_to> in koha-conf
3 - Restart all
4 - perl misc/search_tools/rebuild_elasticsearch.pl
5 - Note requests are shown
6 - Set
    <trace_to>File</trace_to>
    <trace_to>/var/log/koha/kohadev/plack-error.log</trace_to>
    in koha-conf
7 - Restart all
8 - perl misc/search_tools/rebuild_elasticsearch.pl
9 - Check the plack log and see the ES requests

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/SearchEngine/Elasticsearch.pm
etc/koha-conf.xml
t/db_dependent/Koha/SearchEngine/Elasticsearch.t