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

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

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