line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*-perl-*- |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
################################################################################ |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# $Id: OutLogger.pm 211 2009-05-25 06:05:50Z aijaz $ |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
################################################################################ |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
TaskForest::OutLogger - Functions related to logging to stdout |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 DOCUMENTATION |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
This is a class that is used to tie prints to STDOUT to $log->info(); |
16
|
|
|
|
|
|
|
See Logger::Log4perl for more details. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=cut |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
package TaskForest::OutLogger; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
87
|
|
|
87
|
|
486
|
use strict; |
|
87
|
|
|
|
|
152
|
|
|
87
|
|
|
|
|
3172
|
|
25
|
87
|
|
|
87
|
|
443
|
use warnings; |
|
87
|
|
|
|
|
158
|
|
|
87
|
|
|
|
|
2226
|
|
26
|
87
|
|
|
87
|
|
466
|
use TaskForest::Logs; |
|
87
|
|
|
|
|
124
|
|
|
87
|
|
|
|
|
2037
|
|
27
|
87
|
|
|
87
|
|
453
|
use Log::Log4perl; |
|
87
|
|
|
|
|
162
|
|
|
87
|
|
|
|
|
524
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
BEGIN { |
30
|
87
|
|
|
87
|
|
3924
|
use vars qw($VERSION); |
|
87
|
|
|
|
|
157
|
|
|
87
|
|
|
|
|
4172
|
|
31
|
87
|
|
|
87
|
|
10714
|
$VERSION = '1.30'; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub TIEHANDLE { |
35
|
70
|
|
|
70
|
|
281
|
my $class = shift; |
36
|
70
|
|
|
|
|
592
|
bless { log => $TaskForest::Logs::log } , $class; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub PRINT { |
40
|
248
|
|
|
248
|
|
2003
|
my $self = shift; |
41
|
248
|
|
|
|
|
3825
|
$Log::Log4perl::caller_depth++; |
42
|
248
|
|
|
|
|
6368
|
$self->{log}->info(@_); |
43
|
248
|
|
|
|
|
406721
|
$Log::Log4perl::caller_depth--; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|