2 |
## $Id$ |
## $Id$ |
3 |
## -------------------------------------------------------------------------------- |
## -------------------------------------------------------------------------------- |
4 |
## $Log$ |
## $Log$ |
5 |
|
## Revision 1.5 2003/12/12 16:45:04 ts-dev |
6 |
|
## format: package & subroutine (%P:: %s) |
7 |
|
## |
8 |
|
## Revision 1.4 2003/12/05 18:08:20 joko |
9 |
|
## + improved: PID and timestamp |
10 |
|
## |
11 |
## Revision 1.3 2003/12/05 05:08:01 joko |
## Revision 1.3 2003/12/05 05:08:01 joko |
12 |
## + enhanced: more flexible - completely dis-/enable logging - don't do any logging when running tests |
## + enhanced: more flexible - completely dis-/enable logging - don't do any logging when running tests |
13 |
## |
## |
62 |
sub get_attrs { |
sub get_attrs { |
63 |
my($self, $name) = @_; |
my($self, $name) = @_; |
64 |
if ($name eq 'file') { |
if ($name eq 'file') { |
65 |
|
|
66 |
return { |
return { |
67 |
class => 'Log::Dispatch::File', |
class => 'Log::Dispatch::File', |
68 |
min_level => 'debug', |
min_level => 'debug', |
70 |
filename => $self->{file_filename}, |
filename => $self->{file_filename}, |
71 |
mode => 'append', |
mode => 'append', |
72 |
#format => '[%d] [%p] %m at %F line %L%n', |
#format => '[%d] [%p] %m at %F line %L%n', |
73 |
format => '[%d] [%p] %m%n', |
# new as of 2003-12-05: |
74 |
|
# [%i] shows process-id (pid) |
75 |
|
# dateformat like http://www.w3.org/TR/NOTE-datetime |
76 |
|
format => '[%d{%Y-%m-%dT%H:%M:%S}] [%i] [%p] [%P:: %s] %m%n', |
77 |
}; |
}; |
78 |
} |
} |
79 |
elsif ($name eq 'screen') { |
elsif ($name eq 'screen') { |
84 |
#min_level => 'error', |
#min_level => 'error', |
85 |
min_level => $self->{screen_min_level}, |
min_level => $self->{screen_min_level}, |
86 |
stderr => 1, |
stderr => 1, |
87 |
format => '%p: %m%n', |
format => '[%i] %p: %m%n', |
88 |
}; |
}; |
89 |
} |
} |
90 |
else { |
else { |