/[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.3 by joko, Fri Mar 28 07:23:25 2003 UTC
# Line 2  Line 2 
2  ##  $Id$  ##  $Id$
3  ## ------------------------------------------------------------------------  ## ------------------------------------------------------------------------
4  ##  $Log$  ##  $Log$
5    ##  Revision 1.3  2003/03/28 07:23:25  joko
6    ##  fix to basepath calculation
7    ##
8  ##  Revision 1.2  2003/02/20 21:06:27  joko  ##  Revision 1.2  2003/02/20 21:06:27  joko
9  ##  + configurable by package globals  ##  + configurable by package globals
10  ##  + standalone mode (object creation via 'new')  ##  + standalone mode (object creation via 'new')
# Line 321  sub _configure_LogDispatch { Line 324  sub _configure_LogDispatch {
324    
325    my $configurator = DesignPattern::Object->fromPackage('Log::Dispatch::Configurator::Hardwired');    my $configurator = DesignPattern::Object->fromPackage('Log::Dispatch::Configurator::Hardwired');
326        
327    # FIXME?    # check if running inside a 'PROJECT' space
328    my $basepath = cwd() . '/..';    my $basepath = cwd();
329      my $postpone = '/..';
330      if (-d $basepath . $postpone . '/PROJECT') {
331        $basepath .= $postpone;
332        $basepath .= "/var/log";
333      }
334        
335    # configure custom logHandler    # configure custom logHandler
336        
337      if ($configurator) {      if ($configurator) {
338        
339        $configurator->{file_filename} = "$basepath/var/log/logfile.txt";        $configurator->{file_filename} = "$basepath/app.log";
340        $configurator->{screen_min_level} = 'info';        $configurator->{screen_min_level} = 'info';
341                
342        if ($self->{quiet}) {        if ($self->{quiet}) {

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

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