# classes/phing/listener/HtmlColorLogger.php

## \HtmlColorLogger
jump to top

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:

Extends from
  \DefaultLogger
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)
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.listener
version
  $Revision: 1091 $

### Constants

`CLASS_ERR = 'phing_err'`

`CLASS_VERBOSE = 'phing_verbose'`

`CLASS_DEBUG = 'phing_debug'`

`CLASS_WARN = 'phing_warn'`

`CLASS_INFO = 'phing_info'`

`PREFIX = '<span class='`

`SUFFIX = '>'`

`END_COLOR = '</span>'`

### Properties

`$colorsSet= 'false'`
Default value `false` Details

Type

`$debugColor= ''`
Details

Type

`$errColor= ''`
Details

Type

`$infoColor= ''`
Details

Type

`$verboseColor= ''`
Details

Type

`$warnColor= ''`
Details

Type

### Methods

`__construct( ) :`
Construct new HtmlColorLogger Perform initializations that cannot be done in var declarations.
`printMessage( string $message, \OutputStream $stream, int $priority ) :`
final
Parameters

Name | Type | Description
--- | --- | ---
$message | string |
$stream | \OutputStream |
$priority | int |

Details

see
  \DefaultLogger#printMessage

`setColors( ) :`
finalSet the colors to use from a property file specified in the special phing property file "phing/listener/defaults.properties".
Documentation was generated by DocBlox 0.13.1.