Lines 161-166
sub overloadLoggerConfigurations {
Link Here
|
161 |
#### END OF Test for KD976 - Koha::Logger overload configuration for command line scripts verbosity levels #### |
161 |
#### END OF Test for KD976 - Koha::Logger overload configuration for command line scripts verbosity levels #### |
162 |
############################################################################################################### |
162 |
############################################################################################################### |
163 |
|
163 |
|
|
|
164 |
subtest "Return value passthrough", \&returnValuePassthrough; |
165 |
sub returnValuePassthrough { |
166 |
my ($logger, $log, $retval); |
167 |
|
168 |
$logger = Koha::Logger->get({category => "retval-madness-1"}); |
169 |
$retval = $logger->trace('This is not printed'); |
170 |
$log = t::Koha::Logger::slurpLog('wantArray'); |
171 |
is(scalar(@$log), 0, "No trace written"); |
172 |
is($retval, undef, "Koha::Logger returns undef per Log4perl best practices"); |
173 |
t::Koha::Logger::clearLog(); |
174 |
|
175 |
$retval = $logger->error('This is printed'); |
176 |
$log = t::Koha::Logger::slurpLog('wantArray'); |
177 |
is(scalar(@$log), 1, "Error written"); |
178 |
is($retval, 1, "Koha::Logger returns 1 per Log4perl best practices"); |
179 |
t::Koha::Logger::clearLog(); |
180 |
} |
181 |
t::Koha::Logger::clearLog(); |
182 |
|
164 |
sub _loggerBlarbAllLevels { |
183 |
sub _loggerBlarbAllLevels { |
165 |
my ($logger) = @_; |
184 |
my ($logger) = @_; |
166 |
$logger->trace('trace'); |
185 |
$logger->trace('trace'); |
167 |
- |
|
|