PearLogListener

Implements \BuildListener

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 hans@xmpl.org

version

$Id$

see
package

phing.listener

Methods

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.

Response

\Log

Sets the start-time when the build started. Used for calculating the build-time.

buildStarted(\BuildEvent $event) 

Arguments

$event

\BuildEvent

Logs whether the build succeeded or failed, and any errors that occured during the build. Also outputs the total build-time.

buildFinished(\BuildEvent $event) 

Logs the current target name

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

Arguments

$event

\BuildEvent

Fired when a target has finished. We don't need specific action on this event. So the methods are empty.

targetFinished(\BuildEvent $event) 

@param BuildEvent The BuildEvent

access

public @see BuildEvent::getException()

Arguments

$event

\BuildEvent

Fired when a task is started. We don't need specific action on this event. So the methods are empty.

taskStarted(\BuildEvent $event) 

@param BuildEvent The BuildEvent

access

public @see BuildEvent::getTask()

Arguments

$event

\BuildEvent

Fired when a task has finished. We don't need specific action on this event. So the methods are empty.

taskFinished(\BuildEvent $event) 

Logs a message to the configured PEAR logger.

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

Arguments

$event

\BuildEvent

Constants

Size of the left column in output. The default char width is 12.

LEFT_COLUMN_SIZE

@var int

Properties

Time that the build started

startTime : 

@var int

Maps Phing Project::MSG_* constants to PEAR_LOG_* constants.

levelMap : array
static
var

Type(s)

array

Whether logging has been configured.

logConfigured : boolean
var

Type(s)

boolean

PEAR Log object.

logger : \Log
var

PEAR Log object.

Type(s)

\Log