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 <anton@stoeckl.de> (Phing HTML Color Logger)
author Hans Lellelid <hans@xmpl.org> (Phing Ansi Color Logger)
author Magesh Umasankar (Ant)
package phing.listener
version $Id: 4b57f4d435b61b6501688394f1ff8534d4b7e93f $
copyright 2001,2002 THYRELL. All rights reserved

 Methods

Construct new HtmlColorLogger Perform initializations that cannot be done in var declarations.

__construct() 

Prints whether the build succeeded or failed, and any errors that occured during the build.

buildFinished(\BuildEvent $event) 
Inherited

Also outputs the total build-time.

inherited_from \DefaultLogger::buildFinished()

Parameters

$event

object

The BuildEvent @see BuildEvent::getException()

Sets the start-time when the build started.

buildStarted(\BuildEvent $event) 
Inherited

Used for calculating the build-time.

inherited_from \DefaultLogger::buildStarted()

Parameters

$event

object

The BuildEvent @access public

Formats a time micro integer to human readable format.

formatTime($micros) 
InheritedStatic

@param integer The time stamp

access private
inherited_from \DefaultLogger::formatTime()

Parameters

$micros

Sets the error stream.

setErrorStream(\OutputStream $err) 
Inherited
see \global\BuildLogger#setErrorStream()
inherited_from \DefaultLogger::setErrorStream()

Parameters

Set the msgOutputLevel this logger is to respond to.

setMessageOutputLevel(int $level) 
Inherited

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.

see \global\BuildLogger#setMessageOutputLevel()
inherited_from \DefaultLogger::setMessageOutputLevel()

Parameters

$level

int

The logging level for the logger.

Sets the output stream.

setOutputStream(\OutputStream $output) 
Inherited
see \global\BuildLogger#setOutputStream()
inherited_from \DefaultLogger::setOutputStream()

Parameters

$output

\OutputStream

Fired when a target has finished.

targetFinished(\BuildEvent $event) 
Inherited

We don't need specific action on this event. So the methods are empty.

inherited_from \DefaultLogger::targetFinished()

Parameters

$event

object

The BuildEvent @see BuildEvent::getException()

Fired when a task has finished.

taskFinished(\BuildEvent $event) 
Inherited

We don't need specific action on this event. So the methods are empty.

inherited_from \DefaultLogger::taskFinished()

Parameters

$event

object

The BuildEvent @access public @see BuildEvent::getException()

Fired when a task is started.

taskStarted(\BuildEvent $event) 
Inherited

We don't need specific action on this event. So the methods are empty.

inherited_from \DefaultLogger::taskStarted()

Parameters

$event

object

The BuildEvent @access public @see BuildEvent::getTask()

Get the message to return when a build failed.

getBuildFailedMessage() : string
Inherited
inherited_from \DefaultLogger::getBuildFailedMessage()

Returns

stringThe classic "BUILD FAILED"

Get the message to return when a build succeeded.

getBuildSuccessfulMessage() : string
Inherited
inherited_from \DefaultLogger::getBuildSuccessfulMessage()

Returns

stringThe classic "BUILD FINISHED"

Prints a message to console.

printMessage(string $message, \OutputStream $stream, int $priority) : void
see \global\DefaultLogger#printMessage

Parameters

$message

string

$stream

\OutputStream

$priority

int

Set the colors to use from a property file specified in the special phing property file "phing/listener/defaults.properties".

setColors() 

 Properties

 

Stream to use for error output.

$err : \OutputStream
Inherited
inherited_from \DefaultLogger::$$err
 

$msgOutputLevel : int
Inherited

The default is

Project::MSG_VERBOSE

.

inherited_from \DefaultLogger::$$msgOutputLevel
 

Stream to use for standard output.

$out : \OutputStream
Inherited
inherited_from \DefaultLogger::$$out
 

$startTime 
Inherited

@var int

inherited_from \DefaultLogger::$$startTime
 

$colorsSet 
 

$debugColor 
 

$errColor 
 

$infoColor 
 

$verboseColor 
 

$warnColor 

 Constants

 

CLASS_DEBUG

CLASS_DEBUG 
 

CLASS_ERR

CLASS_ERR 
 

CLASS_INFO

CLASS_INFO 
 

CLASS_VERBOSE

CLASS_VERBOSE 
 

CLASS_WARN

CLASS_WARN 
 

END_COLOR

END_COLOR 
 

Size of the left column in output.

LEFT_COLUMN_SIZE : int
Inherited

The default char width is 12.

inherited_from \DefaultLogger::LEFT_COLUMN_SIZE
 

PREFIX

PREFIX 
 

SUFFIX

SUFFIX