blib/lib/Mojolicious/Plugin/Log/Timestamp.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 10 | 10 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 3 | 3 | 100.0 |
pod | 1 | 1 | 100.0 |
total | 14 | 14 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Mojolicious::Plugin::Log::Timestamp; | ||||||
2 | 2 | 2 | 517205 | use Mojo::Base 'Mojolicious::Plugin'; | |||
2 | 4 | ||||||
2 | 15 | ||||||
3 | |||||||
4 | 2 | 2 | 4011 | use Mojar::Log; | |||
2 | 78700 | ||||||
2 | 12 | ||||||
5 | |||||||
6 | our $VERSION = 0.023; | ||||||
7 | |||||||
8 | sub register { | ||||||
9 | 1 | 1 | 1 | 21115 | my ($self, $app, $cfg) = @_; | ||
10 | 1 | 16 | my $log = Mojar::Log->new($cfg); | ||||
11 | 1 | 69 | $app->log($log); | ||||
12 | 1 | 30 | $app->log->debug(q{Customised log timestamps}); | ||||
13 | } | ||||||
14 | |||||||
15 | 1; | ||||||
16 | __END__ |