line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::Logite; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
21871
|
use strict; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
228
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
8
|
use base 'Mojolicious::Plugin'; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
168
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
897
|
use MojoX::Logite; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
15
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub register |
11
|
|
|
|
|
|
|
{ |
12
|
1
|
|
|
1
|
1
|
54
|
my ($self, $app, $conf) = @_; |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
50
|
|
|
8
|
$conf ||= {}; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
50
|
|
|
12
|
my $stash_key = delete $conf->{stash_key} || 'logite'; |
17
|
|
|
|
|
|
|
|
18
|
1
|
50
|
|
|
|
12
|
$conf->{'path'} = $app->home->rel_file('log/mojo_log.db') |
19
|
|
|
|
|
|
|
unless (exists $conf->{'path'}); |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
|
|
10
|
my $logite = MojoX::Logite->new (%$conf); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# Default |
24
|
1
|
|
|
|
|
27
|
$app->defaults($stash_key => $logite); |
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
|
|
38
|
return $logite; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
__END__ |