Bug 24313: Always display XSLT errors in logs

From
  commit 295ae33800
  Bug 20272: Replace error numbers by codes in XSLT_Handler

"""
    Make XSLT_Handler a little bit less noisy by defaulting print_warns to
    false unless $ENV{DEBUG} is set. (See also bug 19018).
"""

I think we should warn the errors in the logs. They are not debug messages here, we should not rely on DEBUG.
If too noisy we should fix the original issues, not hide all the errors (which make the XSLT debugging super hard)

Test plan:
Break a XSLT, reload the page and confirm that there are useful errors in the Koha log file

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit ec79582374)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8bcafbe3cf)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
This commit is contained in:
Jonathan Druart 2019-12-27 14:55:36 +01:00 committed by Hayley Mapley
parent 296524c978
commit b6a6bfb9fb
1 changed files with 1 additions and 3 deletions

View File

@ -264,9 +264,7 @@ sub _init {
$self->_set_error;
$self->{xslt_hash} = {};
$self->{print_warns} = exists $self->{print_warns}
? $self->{print_warns}
: $ENV{DEBUG} // 0;
$self->{print_warns} = 1 unless exists $self->{print_warns};
$self->{do_not_return_source} = 0
unless exists $self->{do_not_return_source};