2 |
## $Id$ |
## $Id$ |
3 |
## ------------------------------------------------------------------------ |
## ------------------------------------------------------------------------ |
4 |
## $Log$ |
## $Log$ |
5 |
## Revision 1.1 2003/12/16 19:22:26 ts-dev |
## Revision 1.2 2003/12/16 19:27:32 ts-dev |
6 |
## first check-in |
## first check-in |
7 |
## |
## |
8 |
## |
## |
232 |
|
|
233 |
$self->{__logger}->{level} ||= $LEVEL_DEFAULT; |
$self->{__logger}->{level} ||= $LEVEL_DEFAULT; |
234 |
$self->_configure_LogDispatch(); |
$self->_configure_LogDispatch(); |
235 |
local :Dispatch::Config::CallerDepth = 3; |
local ${Log::Dispatch::Config::CallerDepth} = 3; |
236 |
$self->{__logger}->{instance}->log( level => $self->{__logger}->{level}, message => $message ); |
$self->{__logger}->{instance}->log( level => $self->{__logger}->{level}, message => $message ); |
237 |
#$self->__init('log', $message); |
#$self->__init('log', $message); |
238 |
#$self->__out(); |
#$self->__out(); |
290 |
# $logger->info( __PACKAGE__ . "->trace: '$caller' (mixed into '$classname'): ($options->{tag}) $message."); |
# $logger->info( __PACKAGE__ . "->trace: '$caller' (mixed into '$classname'): ($options->{tag}) $message."); |
291 |
|
|
292 |
# V2: |
# V2: |
293 |
#local :Dispatch::Config::CallerDepth = 3; |
#local ${Log::Dispatch::Config::CallerDepth} = 3; |
294 |
#$self->{__logger}->{instance}->log( level => $self->{__logger}->{level}, message => $message ); |
#$self->{__logger}->{instance}->log( level => $self->{__logger}->{level}, message => $message ); |
295 |
$self->__init('trace', $message); |
$self->__init('trace', $message); |
296 |
$self->__out(); |
$self->__out(); |
385 |
crit critical alert emerg emergency) ) { |
crit critical alert emerg emergency) ) { |
386 |
*{$l} = sub { |
*{$l} = sub { |
387 |
my $self = shift; |
my $self = shift; |
388 |
local :Dispatch::Config::CallerDepth = |
local ${Log::Dispatch::Config::CallerDepth} = |
389 |
:Dispatch::Config::CallerDepth + 1; |
${Log::Dispatch::Config::CallerDepth} + 1; |
390 |
$self->log( "@_", $l ); |
$self->log( "@_", $l ); |
391 |
}; |
}; |
392 |
} |
} |
398 |
my ($message, $level) = @_; |
my ($message, $level) = @_; |
399 |
$level ||= 'debug'; |
$level ||= 'debug'; |
400 |
my $logger = $self->_get_instance(); |
my $logger = $self->_get_instance(); |
401 |
local $Log$ |
local ${Log::Dispatch::Config::CallerDepth} = ${Log::Dispatch::Config::CallerDepth} + 1; |
|
local Revision 1.1 2003/12/16 19:22:26 ts-dev |
|
|
local first check-in |
|
|
localLog::Dispatch::Config::CallerDepth + 1; |
|
402 |
$logger->log( level => $level, message => $message ); |
$logger->log( level => $level, message => $message ); |
403 |
} |
} |
404 |
|
|
408 |
local $Data::Dumper::Indent = 1; |
local $Data::Dumper::Indent = 1; |
409 |
local $Data::Dumper::Sortkeys = 1; |
local $Data::Dumper::Sortkeys = 1; |
410 |
my $dump = Dumper $data; |
my $dump = Dumper $data; |
411 |
local $Log$ |
local ${Log::Dispatch::Config::CallerDepth} = ${Log::Dispatch::Config::CallerDepth} + 1; |
|
local Revision 1.1 2003/12/16 19:22:26 ts-dev |
|
|
local first check-in |
|
|
localLog::Dispatch::Config::CallerDepth + 1; |
|
412 |
$self->log("DUMP: \n$dump", 'debug'); |
$self->log("DUMP: \n$dump", 'debug'); |
413 |
} |
} |
414 |
sub strace { |
sub strace { |
422 |
#$message .= qq# ${subroutine} ($filename line $line)\n#; |
#$message .= qq# ${subroutine} ($filename line $line)\n#; |
423 |
$message .= qq# ${subroutine} (line $line)\n#; |
$message .= qq# ${subroutine} (line $line)\n#; |
424 |
} |
} |
425 |
local $Log$ |
local ${Log::Dispatch::Config::CallerDepth} = ${Log::Dispatch::Config::CallerDepth} + 1; |
|
local Revision 1.1 2003/12/16 19:22:26 ts-dev |
|
|
local first check-in |
|
|
localLog::Dispatch::Config::CallerDepth + 1; |
|
426 |
$self->log($message, 'debug'); |
$self->log($message, 'debug'); |
427 |
} |
} |
428 |
|
|