/[cvs]/nfo/perl/libs/DesignPattern/Logger.pm
ViewVC logotype

Diff of /nfo/perl/libs/DesignPattern/Logger.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by joko, Thu Feb 20 21:06:27 2003 UTC revision 1.5 by joko, Tue May 13 08:40:15 2003 UTC
# Line 2  Line 2 
2  ##  $Id$  ##  $Id$
3  ## ------------------------------------------------------------------------  ## ------------------------------------------------------------------------
4  ##  $Log$  ##  $Log$
5    ##  Revision 1.5  2003/05/13 08:40:15  joko
6    ##  minor update: renamed attribute
7    ##
8    ##  Revision 1.4  2003/03/29 07:16:00  joko
9    ##  minor update: changed default log-file-name to 'perl_app.log'
10    ##
11    ##  Revision 1.3  2003/03/28 07:23:25  joko
12    ##  fix to basepath calculation
13    ##
14  ##  Revision 1.2  2003/02/20 21:06:27  joko  ##  Revision 1.2  2003/02/20 21:06:27  joko
15  ##  + configurable by package globals  ##  + configurable by package globals
16  ##  + standalone mode (object creation via 'new')  ##  + standalone mode (object creation via 'new')
# Line 321  sub _configure_LogDispatch { Line 330  sub _configure_LogDispatch {
330    
331    my $configurator = DesignPattern::Object->fromPackage('Log::Dispatch::Configurator::Hardwired');    my $configurator = DesignPattern::Object->fromPackage('Log::Dispatch::Configurator::Hardwired');
332        
333    # FIXME?    # check if running inside a 'PROJECT' space
334    my $basepath = cwd() . '/..';    my $basepath = cwd();
335      my $postpone = '/..';
336      if (-d $basepath . $postpone . '/PROJECT') {
337        $basepath .= $postpone;
338        $basepath .= "/var/log";
339      }
340        
341    # configure custom logHandler    # configure custom logHandler
342        
343      if ($configurator) {      if ($configurator) {
344        
345        $configurator->{file_filename} = "$basepath/var/log/logfile.txt";        $configurator->{file_filename} = "$basepath/perl_app.log";
346        $configurator->{screen_min_level} = 'info';        $configurator->{screen_min_level} = 'info';
347                
348        if ($self->{quiet}) {        if ($self->{quiet}) {
# Line 339  sub _configure_LogDispatch { Line 353  sub _configure_LogDispatch {
353          $configurator->{screen_min_level} = 'debug';          $configurator->{screen_min_level} = 'debug';
354        }        }
355                
356        if ($self->{verbose}) {        if ($self->{LOG_VERBOSE}) {
357          $configurator->{verbose} = 1;          $configurator->{verbose} = 1;
358        }        }
359    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed