phing-listener

# Class: PearLogListener Source Location: /listener/PearLogListener.php
### Class Overview
Writes build messages to PEAR Log. #### Author(s): Hans Lellelid <hans@xmpl.org> #### Version: $Revision: 552 $ $Date: 2009-08-29 14:18:13 +0200 (Sat, 29 Aug 2009) $ Implements interfaces: BuildListener | ### Variables $levelMap $logConfigured $logger $startTime | ### Constants LEFT_COLUMN_SIZE | ### Methods buildFinished buildStarted configureLogging logger messageLogged targetFinished targetStarted taskFinished taskStarted
### Class Details [line 43] 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 #### Tags:
author: | Hans Lellelid <hans@xmpl.org>
version: | $Revision: 552 $ $Date: 2009-08-29 14:18:13 +0200 (Sat, 29 Aug 2009) $
see: | BuildEvent
[ Top ] ### Class Variables #### static $levelMap = array( Project::MSG_DEBUG => PEAR_LOG_DEBUG, Project::MSG_INFO => PEAR_LOG_INFO, Project::MSG_VERBOSE => PEAR_LOG_NOTICE, Project::MSG_WARN => PEAR_LOG_WARNING, Project::MSG_ERR => PEAR_LOG_ERR ) [line 61] Maps Phing Project::MSG_* constants to PEAR_LOG_* constants. #### Tags:
access: | protected
Type: | array
[ Top ] #### $logConfigured = false [line 71] Whether logging has been configured. #### Tags:
access: | protected
Type: | boolean
[ Top ] #### $logger = [line 76] #### Tags:
var: | PEAR Log object.
access: | protected
Type: | Log
[ Top ] #### $startTime = [line 55] Time that the build started #### Tags:
access: | protected
Type: | int
[ Top ] ### Class Methods ### method buildFinished [line 132]
`void buildFinished( $event)`
Logs whether the build succeeded or failed, and any errors that occured during the build. Also outputs the total build-time. #### Tags:
see: | BuildEvent::getException()
access: | public
Implementation of: BuildListener::buildFinished #### Parameters:
BuildEvent | $event | The BuildEvent
[ Top ] ### method buildStarted [line 119]
`void buildStarted( $event)`
Sets the start-time when the build started. Used for calculating the build-time. #### Tags:
access: | public
Implementation of: BuildListener::buildStarted #### Parameters:
BuildEvent | $event | The BuildEvent
[ Top ] ### method configureLogging [line 81]
`void configureLogging( )`
Configure the logger. #### Tags:
access: | protected
[ Top ] ### method logger [line 106]
`Log logger( )`
Get the configured PEAR logger to use. This method just ensures that logging has been configured and returns the configured logger. #### Tags:
access: | protected
[ Top ] ### method messageLogged [line 185]
`void messageLogged( $event)`
Logs a message to the configured PEAR logger. #### Tags:
see: | BuildEvent::getMessage()
access: | public
Implementation of: BuildListener::messageLogged #### Parameters:
BuildEvent | $event | The BuildEvent
[ Top ] ### method targetFinished [line 158]
`void targetFinished( $event)`
Fired when a target has finished. We don't need specific action on this event. So the methods are empty. #### Tags:
see: | BuildEvent::getException()
access: | public
Implementation of: BuildListener::targetFinished #### Parameters:
BuildEvent | $event | The BuildEvent
[ Top ] ### method targetStarted [line 148]
`void targetStarted( $event)`
Logs the current target name #### Tags:
see: | BuildEvent::getTarget()
access: | public
Implementation of: BuildListener::targetStarted #### Parameters:
BuildEvent | $event | The BuildEvent
[ Top ] ### method taskFinished [line 177]
`void taskFinished( $event)`
Fired when a task has finished. We don't need specific action on this event. So the methods are empty. #### Tags:
see: | BuildEvent::getException()
access: | public
Implementation of: BuildListener::taskFinished #### Parameters:
BuildEvent | $event | The BuildEvent
[ Top ] ### method taskStarted [line 168]
`void taskStarted( $event)`
Fired when a task is started. We don't need specific action on this event. So the methods are empty. #### Tags:
see: | BuildEvent::getTask()
access: | public
Implementation of: BuildListener::taskStarted #### Parameters:
BuildEvent | $event | The BuildEvent
[ Top ] ### Class Constants #### LEFT_COLUMN_SIZE = 12 [line 49] Size of the left column in output. The default char width is 12. [ Top ] Documentation generated on Mon, 19 Oct 2009 10:51:27 +0200 by phpDocumentor 1.4.3