Writes build messages to PEAR Log.

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
author Hans Lellelid
version $Id$
see \global\BuildEvent
package phing.listener

 Methods

Logs whether the build succeeded or failed, and any errors that occured during the build.

buildFinished(\BuildEvent $event) 

Also outputs the total build-time.

see \global\BuildEvent::getException()

Parameters

$event

\BuildEvent

The BuildEvent

Sets the start-time when the build started.

buildStarted(\BuildEvent $event) 

Used for calculating the build-time.

Parameters

$event

\BuildEvent

The BuildEvent

Logs a message to the configured PEAR logger.

messageLogged(\BuildEvent $event) 
see \global\BuildEvent::getMessage()

Parameters

$event

\BuildEvent

The BuildEvent

Fired when a target has finished.

targetFinished(\BuildEvent $event) 

We don't need specific action on this event. So the methods are empty.

Parameters

$event

\BuildEvent

The BuildEvent @access public @see BuildEvent::getException()

Logs the current target name

targetStarted(\BuildEvent $event) 
see \global\BuildEvent::getTarget()

Parameters

$event

\BuildEvent

The BuildEvent

Fired when a task has finished.

taskFinished(\BuildEvent $event) 

We don't need specific action on this event. So the methods are empty.

see \global\BuildEvent::getException()

Parameters

$event

\BuildEvent

The BuildEvent

Fired when a task is started.

taskStarted(\BuildEvent $event) 

We don't need specific action on this event. So the methods are empty.

Parameters

$event

\BuildEvent

The BuildEvent @access public @see BuildEvent::getTask()

Configure the logger.

configureLogging() 

Get the configured PEAR logger to use.

logger() : \Log

This method just ensures that logging has been configured and returns the configured logger.

Returns

\Log

 Properties

 

$levelMap : array
 

$logConfigured : boolean
 

PEAR Log object.

$logger : \Log
 

$startTime 

@var int

 Constants

 

Size of the left column in output.

LEFT_COLUMN_SIZE : int

The default char width is 12.