| 1 | package DBIx::Class::DeploymentHandler::LogRouter; | ||||||||||||||||||||||||||||
| 2 | 20 | $DBIx::Class::DeploymentHandler::LogRouter::VERSION = '0.002233'; | |||||||||||||||||||||||||||
| 3 | 20 | ▶ | use Moo; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 20 | ▶ | use DBIx::Class::DeploymentHandler::Logger; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 20 | with 'Log::Contextual::Role::Router'; | |||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | has _logger => ( | ||||||||||||||||||||||||||||
| 9 | is => 'lazy', | ||||||||||||||||||||||||||||
| 10 | 10 | ▶ | builder => sub { DBIx::Class::DeploymentHandler::Logger->new }, | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
_build__logger: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | 20 | ); | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | sub handle_log_request { | ||||||||||||||||||||||||||||
| 14 | 409 | ▶ | my ($self, %message_info) = @_; | ||||||||||||||||||||||||||
|
Subroutine
handle_log_request: called CC=3 SCAR=12.3
Pod
undocumented
| |||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 409 | my $log_code_block = $message_info{message_sub}; | |||||||||||||||||||||||||||
| 17 | 409 | my $args = $message_info{message_args}; | |||||||||||||||||||||||||||
| 18 | 409 | my $log_level_name = $message_info{message_level}; | |||||||||||||||||||||||||||
| 19 | 409 | my $logger = $self->_logger; | |||||||||||||||||||||||||||
| 20 | 409 | my $is_active = $logger->can("is_${log_level_name}"); | |||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 409 | ▶ | return unless defined $is_active && $logger->$is_active; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $is_active and $logger->$is_active
MC/DC0%0/2
defined $is_active and $logger->$is_active
defined $is_active
$logger->$is_active
Truth table33%1/3
A and B
A= defined $is_activeB= $logger->$is_active
| |||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 0 | my $log_message = $log_code_block->(@$args); | |||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | 0 | $self->_logger->$log_level_name($log_message); | |||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | ▶ | sub before_import {} | |||||||||||||||||||||||||||
|
Subroutine
before_import: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 30 | ▶ | sub after_import {} | |||||||||||||||||||||||||||
|
Subroutine
after_import: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 20 | 1; | |||||||||||||||||||||||||||