listener/PearLogListener.php
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
- Package
- phing.listener
- See
- \BuildEvent
- Version
- $Revision: 552 $ $Date: 2009-08-29 14:18:13 +0200 (Sat, 29 Aug 2009) $
\PearLogListener
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
- Implements
- \BuildListener
- See
- \BuildEvent
- Author
- Hans Lellelid
- Version
- $Revision: 552 $ $Date: 2009-08-29 14:18:13 +0200 (Sat, 29 Aug 2009) $
Constants
Properties

array
$levelMap= 'array( Project::MSG_DEBUG => PEAR_LOG_DEBUG'
Maps Phing Project::MSG_* constants to PEAR_LOG_* constants.
array( Project::MSG_DEBUG => PEAR_LOG_DEBUGDetails- Type
- array

boolean
$logConfigured= 'false'
Whether logging has been configured.
falseDetails- Type
- boolean
Methods

buildFinished(
\BuildEvent $event
)
:
voidLogs whether the build succeeded or failed, and any errors that occured during the build. Also outputs the total build-time.
| Name | Type | Description |
|---|---|---|
| $event | \BuildEvent | The BuildEvent |

buildStarted(
\BuildEvent $event
)
:
voidSets the start-time when the build started. Used for calculating the build-time.
| Name | Type | Description |
|---|---|---|
| $event | \BuildEvent | The BuildEvent |

logger(
)
:
\LogGet the configured PEAR logger to use.
This method just ensures that logging has been configured and returns the configured logger.
| Type | Description |
|---|---|
| \Log |

messageLogged(
\BuildEvent $event
)
:
voidLogs a message to the configured PEAR logger.
@param BuildEvent The BuildEvent
| Name | Type | Description |
|---|---|---|
| $event | \BuildEvent | The BuildEvent |

targetFinished(
\BuildEvent $event
)
:
voidFired when a target has finished. We don't need specific action on this event. So the methods are empty.
@param BuildEvent The BuildEvent
| Name | Type | Description |
|---|---|---|
| $event | \BuildEvent | The BuildEvent |
- Access
- public
- See
- \BuildEvent::getException()

targetStarted(
\BuildEvent $event
)
:
voidLogs the current target name
| Name | Type | Description |
|---|---|---|
| $event | \BuildEvent | The BuildEvent |

taskFinished(
\BuildEvent $event
)
:
voidFired when a task has finished. We don't need specific action on this event. So the methods are empty.
@param BuildEvent The BuildEvent
| Name | Type | Description |
|---|---|---|
| $event | \BuildEvent | The BuildEvent |

taskStarted(
\BuildEvent $event
)
:
voidFired when a task is started. We don't need specific action on this event. So the methods are empty.
@param BuildEvent The BuildEvent
| Name | Type | Description |
|---|---|---|
| $event | \BuildEvent | The BuildEvent |
- Access
- public
- See
- \BuildEvent::getTask()