PHP Class PearLogListener, symfony-1.4

By default it will log to file in current directory w/ name 'phing.log'. You can customize this behavior by setting properties: - pear.log.type - pear.log.name - pear.log.ident (note that this class changes ident to project name) - pear.log.conf (note that array values are currently unsupported in Phing property files) phing -f build.xml -logger phing.listener.PearLogger -Dpear.log.type=file -Dpear.log.name=/path/to/log.log
See also: BuildEvent
Author: Hans Lellelid ([email protected])
Inheritance: implements BuildListener
Afficher le fichier Open project: vjousse/symfony-1.4

Protected Properties

Свойство Type Description
$levelMap array Maps Phing Project::MSG_* constants to PEAR_LOG_* constants.
$logConfigured boolean Whether logging has been configured.
$logger PEAR Log object.
$startTime integer @var int

Méthodes publiques

Méthode Description
buildFinished ( BuildEvent $event ) Logs whether the build succeeded or failed, and any errors that occured during the build. Also outputs the total build-time.
buildStarted ( BuildEvent $event ) Sets the start-time when the build started. Used for calculating the build-time.
messageLogged ( BuildEvent $event ) Logs a message to the configured PEAR logger.
targetFinished ( BuildEvent $event ) Fired when a target has finished. We don't need specific action on this event. So the methods are empty.
targetStarted ( BuildEvent $event ) Logs the current target name
taskFinished ( BuildEvent $event ) Fired when a task has finished. We don't need specific action on this event. So the methods are empty.
taskStarted ( BuildEvent $event ) Fired when a task is started. We don't need specific action on this event. So the methods are empty.

Méthodes protégées

Méthode Description
configureLogging ( ) Configure the logger.
logger ( ) : Log Get the configured PEAR logger to use.

Method Details

buildFinished() public méthode

Logs whether the build succeeded or failed, and any errors that occured during the build. Also outputs the total build-time.
See also: BuildEvent::getException()
public buildFinished ( BuildEvent $event )
$event BuildEvent

buildStarted() public méthode

Sets the start-time when the build started. Used for calculating the build-time.
public buildStarted ( BuildEvent $event )
$event BuildEvent

configureLogging() protected méthode

Configure the logger.
protected configureLogging ( )

logger() protected méthode

This method just ensures that logging has been configured and returns the configured logger.
protected logger ( ) : Log
Résultat Log

messageLogged() public méthode

Logs a message to the configured PEAR logger.
See also: BuildEvent::getMessage()
public messageLogged ( BuildEvent $event )
$event BuildEvent

targetFinished() public méthode

@param BuildEvent The BuildEvent
public targetFinished ( BuildEvent $event )
$event BuildEvent

targetStarted() public méthode

Logs the current target name
See also: BuildEvent::getTarget()
public targetStarted ( BuildEvent $event )
$event BuildEvent

taskFinished() public méthode

Fired when a task has finished. We don't need specific action on this event. So the methods are empty.
See also: BuildEvent::getException()
public taskFinished ( BuildEvent $event )
$event BuildEvent

taskStarted() public méthode

@param BuildEvent The BuildEvent
public taskStarted ( BuildEvent $event )
$event BuildEvent

Property Details

$levelMap protected_oe static_oe property

Maps Phing Project::MSG_* constants to PEAR_LOG_* constants.
protected static array $levelMap
Résultat array

$logConfigured protected_oe property

Whether logging has been configured.
protected bool $logConfigured
Résultat boolean

$logger protected_oe property

PEAR Log object.
protected $logger

$startTime protected_oe property

@var int
protected int $startTime
Résultat integer