line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::YG::Apache::Error; |
2
|
2
|
|
|
2
|
|
34860
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
88
|
|
3
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
524
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# [Sat Oct 06 17:34:17 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) |
6
|
|
|
|
|
|
|
# [Sat Oct 06 17:36:10 2012] [error] [client 123.220.65.13] File does not exist: /var/www/html/favicon.ico |
7
|
|
|
|
|
|
|
our $regexp = qr/^ |
8
|
|
|
|
|
|
|
\[([^\]]+)\]\ +\[([^\]]+)\]\ + |
9
|
|
|
|
|
|
|
(?:\[client\ ([^\]]+)\]\ +)? |
10
|
|
|
|
|
|
|
(.+) |
11
|
|
|
|
|
|
|
$/x; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub parse { |
14
|
4
|
|
|
4
|
1
|
30463
|
my $line = shift; |
15
|
|
|
|
|
|
|
|
16
|
4
|
100
|
|
|
|
71
|
$line =~ m!$regexp! or warn "failed to parse line: '$line'\n"; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
return [ |
19
|
4
|
|
100
|
|
|
232
|
$1 || '', $2 ||'', |
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
20
|
|
|
|
|
|
|
$3 || '', |
21
|
|
|
|
|
|
|
$4 || '', |
22
|
|
|
|
|
|
|
]; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub labels { |
26
|
0
|
|
|
0
|
1
|
|
return [qw/ |
27
|
|
|
|
|
|
|
Date |
28
|
|
|
|
|
|
|
Log_Level |
29
|
|
|
|
|
|
|
Client |
30
|
|
|
|
|
|
|
Message |
31
|
|
|
|
|
|
|
/]; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |