listener/HtmlColorLogger.php
Uses CSS class that must be defined in the HTML page where the Phing output is displayed.
If used with the -logfile option, the output will contain the text wrapped in html elements with those css classes.
The default classes used for differentiating the message levels can be changed by editing the phing/listener/defaults.properties file.
This file can contain 5 key/value pairs: HtmlColorLogger.ERROR_CLASS=your_css_class_name HtmlColorLogger.WARNING_CLASS=your_css_class_name HtmlColorLogger.INFO_CLASS=your_css_class_name HtmlColorLogger.VERBOSE_CLASS=your_css_class_name HtmlColorLogger.DEBUG_CLASS=your_css_class_name
This stems from the Ansi Color Logger done by Hans Lellelid:
- Author
- Anton Stöckl
(Phing HTML Color Logger) - Author
- Hans Lellelid
(Phing Ansi Color Logger) - Author
- Magesh Umasankar (Ant)
- Package
- phing.listener
- Version
- $Id: 4b57f4d435b61b6501688394f1ff8534d4b7e93f $
\HtmlColorLogger
Uses CSS class that must be defined in the HTML page where the Phing output is displayed.
If used with the -logfile option, the output will contain the text wrapped in html elements with those css classes.
The default classes used for differentiating the message levels can be changed by editing the phing/listener/defaults.properties file.
This file can contain 5 key/value pairs: HtmlColorLogger.ERROR_CLASS=your_css_class_name HtmlColorLogger.WARNING_CLASS=your_css_class_name HtmlColorLogger.INFO_CLASS=your_css_class_name HtmlColorLogger.VERBOSE_CLASS=your_css_class_name HtmlColorLogger.DEBUG_CLASS=your_css_class_name
This stems from the Ansi Color Logger done by Hans Lellelid:
- Parent(s)
- \DefaultLogger < \StreamRequiredBuildLogger < \BuildLogger < \BuildListener
- Author
- Anton Stöckl
(Phing HTML Color Logger) - Author
- Hans Lellelid
(Phing Ansi Color Logger) - Author
- Magesh Umasankar (Ant)
- Copyright
- 2001,2002 THYRELL. All rights reserved
- Version
- $Id: 4b57f4d435b61b6501688394f1ff8534d4b7e93f $
Constants
LEFT_COLUMN_SIZE
= 12Size 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

\OutputStream
$err= ''
- Type
- \OutputStream
- Inherited_from
- \DefaultLogger::$$err

$msgOutputLevel= 'Project::MSG_ERR'
The message output level that should be used. The default is <code>Project::MSG_VERBOSE</code>.
Inherited from: \DefaultLogger::$$msgOutputLevel@var int
Project::MSG_ERRDetails- Type
- n/a
- Inherited_from
- \DefaultLogger::$$msgOutputLevel

\OutputStream
$out= ''
- Type
- \OutputStream
- Inherited_from
- \DefaultLogger::$$out
Methods

__construct(
)
:
voidConstruct new HtmlColorLogger Perform initializations that cannot be done in var declarations.

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

buildStarted(
$event
)
:
voidSets the start-time when the build started. Used for calculating the build-time.
Inherited from: \DefaultLogger::buildStarted()@param object The BuildEvent
| Name | Type | Description |
|---|---|---|
| $event |
- Access
- public

formatTime(
$micros
)
:
voidFormats a time micro integer to human readable format.
Inherited from: \DefaultLogger::formatTime()@param integer The time stamp
| Name | Type | Description |
|---|---|---|
| $micros |
- Access
- private

getBuildFailedMessage(
)
:
stringGet the message to return when a build failed.
Inherited from: \DefaultLogger::getBuildFailedMessage()| Type | Description |
|---|---|
| string | The classic "BUILD FAILED" |

getBuildSuccessfulMessage(
)
:
stringGet the message to return when a build succeeded.
Inherited from: \DefaultLogger::getBuildSuccessfulMessage()| Type | Description |
|---|---|
| string | The classic "BUILD FINISHED" |

messageLogged(
$event
)
:
void
@param object The BuildEvent
| Name | Type | Description |
|---|---|---|
| $event |
- Access
- public
- See
- \BuildEvent::getMessage()

printMessage(
string $message, \OutputStream $stream, int $priority
)
:
voidPrints a message to console.
| Name | Type | Description |
|---|---|---|
| $message | string | |
| $stream | \OutputStream | |
| $priority | int |
- See
- \DefaultLogger#printMessage

setColors(
)
:
voidSet the colors to use from a property file specified in the special phing property file "phing/listener/defaults.properties".

setErrorStream(
\OutputStream $err
)
:
void
| Name | Type | Description |
|---|---|---|
| $err | \OutputStream |
- See
- \BuildLogger#setErrorStream()

setMessageOutputLevel(
int $level
)
:
voidSet 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.
| Name | Type | Description |
|---|---|---|
| $level | int | The logging level for the logger. |
- See
- \BuildLogger#setMessageOutputLevel()

setOutputStream(
\OutputStream $output
)
:
void
| Name | Type | Description |
|---|---|---|
| $output | \OutputStream |
- See
- \BuildLogger#setOutputStream()

targetFinished(
$event
)
:
voidFired 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
| Name | Type | Description |
|---|---|---|
| $event |

targetStarted(
$event
)
:
void
@param object The BuildEvent
| Name | Type | Description |
|---|---|---|
| $event |
- Access
- public
- See
- \BuildEvent::getTarget()

taskFinished(
$event
)
:
voidFired 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
| Name | Type | Description |
|---|---|---|
| $event |
- Access
- public
- See
- \BuildEvent::getException()

taskStarted(
$event
)
:
voidFired 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
| Name | Type | Description |
|---|---|---|
| $event |
- Access
- public
- See
- \BuildEvent::getTask()