LP#
1840053 Change potentially slow log statements to subroutines
See OpenSRF LP#
1824181 https://bugs.launchpad.net/opensrf/+bug/
1824181
This depends on the above change which was released in OpenSRF 3.0.3 and
3.1.1.
The Evergreen code was searched for potentially slow logging statements
at log level info or above. We then changed those logging statements to
be delayed execution subroutines.
Here is some pseudocode that shows what is being done here:
$log->debug("Some text " . $some->slow_method);
would be changed to:
$log->debug(sub{return "Some text " . $some->slow_method });
In the example change above, an unnamed sub is passed to the OpenSRF
logger module and it will not be executed unless the global logging
level is set to debug or higher (the slow_method will not be called
unless it is needed for the global logging level).
********
If/when this is committed, please use delayed execution subroutines in
the future for any logging statements that could be slow. It is
recommend that any logging statements that do not consist entirely of
quoted text and/or already available scalar variables use delayed
execution subroutines.
********
Signed-off-by: John Merriam <jmerriam@biblio.org>