--- nfo/perl/libs/DesignPattern/Logger.pm 2003/03/28 07:23:25 1.3 +++ nfo/perl/libs/DesignPattern/Logger.pm 2003/06/06 03:19:09 1.6 @@ -1,7 +1,16 @@ ## ------------------------------------------------------------------------ -## $Id: Logger.pm,v 1.3 2003/03/28 07:23:25 joko Exp $ +## $Id: Logger.pm,v 1.6 2003/06/06 03:19:09 joko Exp $ ## ------------------------------------------------------------------------ ## $Log: Logger.pm,v $ +## Revision 1.6 2003/06/06 03:19:09 joko +## minor fixes +## +## Revision 1.5 2003/05/13 08:40:15 joko +## minor update: renamed attribute +## +## Revision 1.4 2003/03/29 07:16:00 joko +## minor update: changed default log-file-name to 'perl_app.log' +## ## Revision 1.3 2003/03/28 07:23:25 joko ## fix to basepath calculation ## @@ -37,6 +46,16 @@ ## ------------------------------------------------------------------------ +=pod + + This is weird! Forget it. + But we depend on it! + Hmmm.... + + +=cut + + package DesignPattern::Logger; use strict; @@ -128,10 +147,11 @@ foreach (@{$METHOD_LEVELS}) { (my $c_package, my $c_filename, my $c_line, my $c_subroutine, my $c_hasargs, my $c_wantarray, my $c_evaltext, my $c_is_require, my $c_hints, my $c_bitmask) = caller($_); + $c_subroutine ||= ''; $c_subroutine =~ s/.*:://; push @methods, $c_subroutine; } - $calling_sub = join(': ', @methods); + $calling_sub = join(': ', @methods) if @methods; } @@ -336,7 +356,7 @@ if ($configurator) { - $configurator->{file_filename} = "$basepath/app.log"; + $configurator->{file_filename} = "$basepath/perl_app.log"; $configurator->{screen_min_level} = 'info'; if ($self->{quiet}) { @@ -347,7 +367,7 @@ $configurator->{screen_min_level} = 'debug'; } - if ($self->{verbose}) { + if ($self->{LOG_VERBOSE}) { $configurator->{verbose} = 1; }