blib/lib/Dancer2/Logger/Capture.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 94.7% 18 / 19 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
_build_trapper
1.0
CRAP 1.0
« lib/Dancer2/Core/Session.pm ↑ Summary blib/lib/Dancer2/Serializer/YAML.pm »
1 package Dancer2::Logger::Capture;
2 # ABSTRACT: Capture dancer logs
3 4 $Dancer2::Logger::Capture::VERSION = '2.3.0';
4 14 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 14 ▶use Dancer2::Logger::Capture::Trap;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 4 with 'Dancer2::Core::Role::Logger';
8  
9 4 has trapper => (
10 is => 'ro',
11 lazy => 1,
12 builder => '_build_trapper',
13 );
14  
15 25 ▶sub _build_trapper { Dancer2::Logger::Capture::Trap->new }
Subroutine _build_trapper: called CC=1 SCAR=0.0
16  
17 66 ▶sub log {
Subroutine log: called CC=1 SCAR=0.0
Pod undocumented
18 66 my ( $self, $level, $message ) = @_;
19  
20 66 $self->trapper->store(
21 $level, $message, $self->format_message( $level => $message )
22 );
23  
24 66 return;
25 }
26  
27 4 1;
28  
29 __END__
« lib/Dancer2/Core/Session.pm ↑ Summary blib/lib/Dancer2/Serializer/YAML.pm »