line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Log::Log4perl::Appender::Lim::CLI; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
95834
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
37
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
43
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use base qw(Log::Log4perl::Appender); |
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
297
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=encoding utf8 |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Log::Log4perl::Appender::Lim::CLI - A Log4perl appender for Lim CLI |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 VERSION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Version 0.15 |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=cut |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = '0.15'; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 DESCRIPTION |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
This module is used for getting L output to the L |
25
|
|
|
|
|
|
|
module. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=cut |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub new { |
30
|
0
|
|
|
0
|
1
|
|
my $this = shift; |
31
|
0
|
|
0
|
|
|
|
my $class = ref($this) || $this; |
32
|
0
|
|
|
|
|
|
my %args = ( @_ ); |
33
|
0
|
|
|
|
|
|
my $self = { |
34
|
|
|
|
|
|
|
name => 'unknown name', |
35
|
|
|
|
|
|
|
%args |
36
|
|
|
|
|
|
|
}; |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
bless $self, $class; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub log { |
42
|
0
|
|
|
0
|
0
|
|
my($self, %params) = @_; |
43
|
|
|
|
|
|
|
|
44
|
0
|
0
|
|
|
|
|
if (defined $self->{cli}) { |
45
|
0
|
|
|
|
|
|
$params{message} =~ s/[\r\n]+$//o; |
46
|
0
|
|
|
|
|
|
$self->{cli}->println($params{message}); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 AUTHOR |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Jerry Lundström, C<< >> |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 BUGS |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Please report any bugs or feature requests to L. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 SUPPORT |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
perldoc Log::Log4perl::Appender::Lim::CLI |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
You can also look for information at: |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=over 4 |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item * Lim issue tracker (report bugs here) |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
L |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=back |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Copyright 2012 Jerry Lundström. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
81
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
82
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=cut |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
1; # End of Log::Log4perl::Appender::Lim::CLI |