Development

Changeset 4722

You must first sign up to be able to contribute.

Changeset 4722

Show
Ignore:
Timestamp:
07/26/07 18:27:13 (1 year ago)
Author:
fabien
Message:

pake: changed Phing colorization from our hack to the default phing.listener.AnsiColorLogger? (errors are in red which is better to spot problems when they occur)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tools/pake/tags/RELEASE_1_1_4/lib/pake/tasks/pakePhingTask.class.php

    r1846 r4722  
    4949    } 
    5050 
     51    $args[] = '-logger'; 
     52    $args[] = 'phing.listener.AnsiColorLogger'; 
     53 
    5154    Phing::startup(); 
    5255    Phing::setProperty('phing.home', getenv('PHING_HOME')); 
    5356 
    54     ob_start(array('pakePhingTask', 'colorize'), 2); 
    5557    $m = new pakePhing(); 
    5658    $m->execute($args); 
    5759    $m->runBuild(); 
    58     ob_end_clean(); 
    59   } 
    60  
    61   public static function colorize($text) 
    62   { 
    63     return preg_replace(array( 
    64       '#\[(.+?)\]#', 
    65       '#{{PHP Error}}#e', 
    66       '#({{.+?}})#e', 
    67       '#(\+ [^ ]+)#e', 
    68       '#{{(.+?)}}#', 
    69     ), array( 
    70       '{{$1}}', 
    71       'pakeColor::colorize("(PHP Error)", "ERROR")', 
    72       'pakeColor::colorize("$1", "INFO")', 
    73       'pakeColor::colorize("$1", "INFO")', 
    74       '[$1]', 
    75     ), $text); 
    7660  } 
    7761}