| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package File::SmartTail::Logger; |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# $Id: NullLogger.pm,v 1.6 2008/07/09 20:40:20 mprewitt Exp $ |
|
4
|
|
|
|
|
|
|
# |
|
5
|
|
|
|
|
|
|
# This file or one of the other loggers is copied to File::SmartTail/Logger.pm |
|
6
|
|
|
|
|
|
|
# during the 'perl Makefile.PL' process. Do not edit File::SmartTail/Logger.pm |
|
7
|
|
|
|
|
|
|
# directly. Edit one of the other Loggers and run make. |
|
8
|
|
|
|
|
|
|
# |
|
9
|
|
|
|
|
|
|
# DMJA, Inc |
|
10
|
|
|
|
|
|
|
# |
|
11
|
|
|
|
|
|
|
# Copyright (C) 2003-2008 DMJA, Inc, File::SmartTail comes with |
|
12
|
|
|
|
|
|
|
# ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to |
|
13
|
|
|
|
|
|
|
# redistribute it and/or modify it under the same terms as Perl itself. |
|
14
|
|
|
|
|
|
|
# See the "The Artistic License" L for more details. |
|
15
|
|
|
|
|
|
|
# |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
{ |
|
19
|
|
|
|
|
|
|
my $v; |
|
20
|
|
|
|
|
|
|
sub LOG { |
|
21
|
2
|
100
|
|
2
|
0
|
30
|
$v and return $v; |
|
22
|
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
5
|
$v = _init_log(); |
|
24
|
|
|
|
|
|
|
|
|
25
|
1
|
|
|
|
|
19
|
return $v; |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub _init_log { |
|
30
|
1
|
|
|
1
|
|
3
|
my $type = __PACKAGE__; |
|
31
|
1
|
|
|
|
|
3
|
my $self = {}; |
|
32
|
1
|
|
33
|
|
|
13
|
bless $self, ref $type || $type; |
|
33
|
1
|
|
|
|
|
5
|
return $self; |
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
|
|
36
|
5
|
|
|
5
|
0
|
18
|
sub debug { return undef; } |
|
37
|
0
|
|
|
0
|
0
|
|
sub info { return undef; } |
|
38
|
0
|
|
|
0
|
0
|
|
sub fatal { return undef; } |
|
39
|
0
|
|
|
0
|
0
|
|
sub warn { return undef; } |
|
40
|
0
|
|
|
0
|
0
|
|
sub error { return undef; } |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub logdie { |
|
43
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
44
|
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
die "@_"; |
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |