line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id: Log.pm 3 2014-04-08 11:43:16Z gomor $ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
package vFeed::Log; |
5
|
1
|
|
|
1
|
|
553
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
6
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
4
|
use base qw(Class::Gomor::Array); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
812
|
|
9
|
|
|
|
|
|
|
our @AS = qw( |
10
|
|
|
|
|
|
|
level |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
__PACKAGE__->cgBuildIndices; |
13
|
|
|
|
|
|
|
__PACKAGE__->cgBuildAccessorsScalar(\@AS); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new { |
16
|
0
|
|
|
0
|
1
|
|
my $self = shift->SUPER::new( |
17
|
|
|
|
|
|
|
level => 0, |
18
|
|
|
|
|
|
|
@_, |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
return $self; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub warning { |
25
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
26
|
0
|
|
|
|
|
|
my ($msg) = @_; |
27
|
0
|
|
|
|
|
|
print("[!] $msg\n"); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub error { |
31
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
32
|
0
|
|
|
|
|
|
my ($msg) = @_; |
33
|
0
|
|
|
|
|
|
print("[-] $msg\n"); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub fatal { |
37
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
38
|
0
|
|
|
|
|
|
my ($msg) = @_; |
39
|
0
|
|
|
|
|
|
my ($package) = caller(); |
40
|
0
|
|
|
|
|
|
die("[-] FATAL: $package: $msg\n"); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub info { |
44
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
45
|
0
|
|
|
|
|
|
my ($msg) = @_; |
46
|
0
|
0
|
|
|
|
|
return unless $self->level > 0; |
47
|
0
|
|
|
|
|
|
print("[+] $msg\n"); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub verbose { |
51
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
52
|
0
|
|
|
|
|
|
my ($msg) = @_; |
53
|
0
|
0
|
|
|
|
|
return unless $self->level > 1; |
54
|
0
|
|
|
|
|
|
print("[*] $msg\n"); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub debug { |
58
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
59
|
0
|
|
|
|
|
|
my ($msg) = @_; |
60
|
0
|
0
|
|
|
|
|
return unless $self->level > 2; |
61
|
0
|
|
|
|
|
|
my ($package) = caller(); |
62
|
0
|
|
|
|
|
|
print("[DEBUG] $package: $msg\n"); |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
__END__ |