line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: /mirror/gungho/lib/Gungho/Log/Simple.pm 4214 2007-10-29T04:36:39.100346Z lestrrat $ |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Copyright (c) 2007 Daisuke Maki <daisuke@endeworks.jp> |
4
|
|
|
|
|
|
|
# All rights reserved. |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Gungho::Log::Simple; |
7
|
1
|
|
|
1
|
|
1262
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
8
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
21
|
|
9
|
1
|
|
|
1
|
|
3
|
use base qw(Gungho::Log::Dispatch); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
11
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new |
12
|
|
|
|
|
|
|
{ |
13
|
|
|
|
|
|
|
my $self = shift; |
14
|
|
|
|
|
|
|
my %args = @_; |
15
|
|
|
|
|
|
|
my $config = $args{config}; |
16
|
|
|
|
|
|
|
if (ref $config->{logs} ne 'HASH') { |
17
|
|
|
|
|
|
|
$config->{logs} = {}; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
$config->{logs}{module} = 'Screen'; |
21
|
|
|
|
|
|
|
$config->{logs}{name} = 'simple'; |
22
|
|
|
|
|
|
|
$self->next::method(%args); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NAME |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Gungho::Log::Simple - Simple Gungho Log Class |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
use Gungho::Log::Simple; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $log = Gungho::Log::Simple->new(); |
38
|
|
|
|
|
|
|
$log->setup($c,); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 DESCRIPTION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
This is a simple logger, which only logs to stderr. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 METHODS |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 new |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |