line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::YG::Apache::Error; |
2
|
2
|
|
|
2
|
|
16720
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
68
|
|
3
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
304
|
|
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
|
8551
|
my $line = shift; |
15
|
|
|
|
|
|
|
|
16
|
4
|
100
|
|
|
|
41
|
$line =~ m!$regexp! or warn "failed to parse line: '$line'\n"; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
return [ |
19
|
4
|
|
100
|
|
|
136
|
$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__ |