listener/MailLogger.php

Show: inherited
Table of Contents

Uses PEAR Mail package to send the build log to one or more recipients.

Author
Michiel Rook  
Package
phing.listener  
Version
$Id$  

\MailLogger

Package: phing\listener

Uses PEAR Mail package to send the build log to one or more recipients.

Currently, it only writes which targets are being executed, and any messages that get logged.

Parent(s)
\DefaultLogger < \StreamRequiredBuildLogger < \BuildLogger < \BuildListener
Author
Michiel Rook  
Copyright
2001,2002 THYRELL. All rights reserved  
Version
$Id$  

Constants

Constant  LEFT_COLUMN_SIZE = 12
inherited

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

Inherited from: \DefaultLogger::LEFT_COLUMN_SIZE

@var int

Inherited_from
\DefaultLogger::LEFT_COLUMN_SIZE  

Properties

Propertyprivate  $_from= '"phing@phing.info"'
Default value"phing@phing.info"Details
Type
n/a
Propertyprivate  $_mailMessage= '""'
Default value""Details
Type
n/a
Propertyprivate  $_subject= '"Phing build result"'
Default value"Phing build result"Details
Type
n/a
Propertyprivate  $_tolist= 'null'
Default valuenullDetails
Type
n/a
Propertyprotected\OutputStream  $err= ''
inherited

Stream to use for error output.Inherited from: \DefaultLogger::$$err
Details
Type
\OutputStream
Inherited_from
\DefaultLogger::$$err  
Propertyprotected  $msgOutputLevel= 'Project::MSG_ERR'
inherited

The message output level that should be used. The default is <code>Project::MSG_VERBOSE</code>.

Inherited from: \DefaultLogger::$$msgOutputLevel

@var int

Default valueProject::MSG_ERRDetails
Type
n/a
Inherited_from
\DefaultLogger::$$msgOutputLevel  
Propertyprotected\OutputStream  $out= ''
inherited

Stream to use for standard output.Inherited from: \DefaultLogger::$$out
Details
Type
\OutputStream
Inherited_from
\DefaultLogger::$$out  
Propertyprotected  $startTime= ''
inherited

Time that the build started

Inherited from: \DefaultLogger::$$startTime

@var int

Details
Type
n/a
Inherited_from
\DefaultLogger::$$startTime  

Methods

methodpublic__construct( ) : void

Construct new MailLogger

methodpublicbuildFinished( \BuildEvent $event ) : void

Sends the mail

@param object The BuildEvent

Parameters
Name Type Description
$event \BuildEvent
Details
See
\DefaultLogger#buildFinished  
methodpublicbuildStarted(  $event ) : void
inherited

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

Inherited from: \DefaultLogger::buildStarted()

@param object The BuildEvent

Parameters
Name Type Description
$event
Details
Access
public  
methodpublicformatTime(  $micros ) : void
staticinherited

Formats a time micro integer to human readable format.

Inherited from: \DefaultLogger::formatTime()

@param integer The time stamp

Parameters
Name Type Description
$micros
Details
Access
private  
methodprotectedgetBuildFailedMessage( ) : string
inherited

Get the message to return when a build failed.

Inherited from: \DefaultLogger::getBuildFailedMessage()
Returns
Type Description
string The classic "BUILD FAILED"
methodprotectedgetBuildSuccessfulMessage( ) : string
inherited

Get the message to return when a build succeeded.

Inherited from: \DefaultLogger::getBuildSuccessfulMessage()
Returns
Type Description
string The classic "BUILD FINISHED"
methodpublicmessageLogged(  $event ) : void
inherited

Print a message to the stdout.

Inherited from: \DefaultLogger::messageLogged()

@param object The BuildEvent

Parameters
Name Type Description
$event
Details
Access
public  
See
\BuildEvent::getMessage()  
methodprotectedprintMessage( string $message, \OutputStream $stream, int $priority ) : void
final

Prints a message to console.

Parameters
Name Type Description
$message string
$stream \OutputStream
$priority int
Details
See
\DefaultLogger#printMessage  
methodpublicsetErrorStream( \OutputStream $err ) : void
inherited

Sets the error stream.

Inherited from: \DefaultLogger::setErrorStream()
Parameters
Name Type Description
$err \OutputStream
Details
See
\BuildLogger#setErrorStream()  
methodpublicsetMessageOutputLevel( int $level ) : void
inherited

Set the msgOutputLevel this logger is to respond to.

Inherited from: \DefaultLogger::setMessageOutputLevel()

Only messages with a message level lower than or equal to the given level are output to the log.

<

p> Constants for the message levels are in Project.php. The order of the levels, from least to most verbose, is:

  • Project::MSG_ERR
  • Project::MSG_WARN
  • Project::MSG_INFO
  • Project::MSG_VERBOSE
  • Project::MSG_DEBUG

The default message level for DefaultLogger is Project::MSG_ERR.

Parameters
Name Type Description
$level int

The logging level for the logger.

Details
See
\BuildLogger#setMessageOutputLevel()  
methodpublicsetOutputStream( \OutputStream $output ) : void
inherited

Sets the output stream.

Inherited from: \DefaultLogger::setOutputStream()
Parameters
Name Type Description
$output \OutputStream
Details
See
\BuildLogger#setOutputStream()  
methodpublictargetFinished(  $event ) : void
inherited

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

Inherited from: \DefaultLogger::targetFinished()

@param object The BuildEvent

Parameters
Name Type Description
$event
Details
See
\BuildEvent::getException()  
methodpublictargetStarted(  $event ) : void
inherited

Prints the current target name

Inherited from: \DefaultLogger::targetStarted()

@param object The BuildEvent

Parameters
Name Type Description
$event
Details
Access
public  
See
\BuildEvent::getTarget()  
methodpublictaskFinished(  $event ) : void
inherited

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

Inherited from: \DefaultLogger::taskFinished()

@param object The BuildEvent

Parameters
Name Type Description
$event
Details
Access
public  
See
\BuildEvent::getException()  
methodpublictaskStarted(  $event ) : void
inherited

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

Inherited from: \DefaultLogger::taskStarted()

@param object The BuildEvent

Parameters
Name Type Description
$event
Details
Access
public  
See
\BuildEvent::getTask()  
Documentation was generated by DocBlox 0.18.1.