listener/HtmlColorLogger.php

Show: inherited
Table of Contents

\HtmlColorLogger

Package: phing\listener

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
Author
Anton Stöckl (Phing HTML Color Logger)  
Author
Hans Lellelid (Phing Ansi Color Logger)  
Author
Magesh Umasankar (Ant)  
Version
$Revision: 1091 $  

Constants

Constant  CLASS_ERR = 'phing_err'
Constant  CLASS_VERBOSE = 'phing_verbose'
Constant  CLASS_DEBUG = 'phing_debug'
Constant  CLASS_WARN = 'phing_warn'
Constant  CLASS_INFO = 'phing_info'
Constant  PREFIX = '<span class="'
Constant  SUFFIX = '">'
Constant  END_COLOR = '</span>'

Properties

Propertyprivate  $colorsSet= 'false'
Default valuefalseDetails
Type
n/a
Propertyprivate  $debugColor= ''
Details
Type
n/a
Propertyprivate  $errColor= ''
Details
Type
n/a
Propertyprivate  $infoColor= ''
Details
Type
n/a
Propertyprivate  $verboseColor= ''
Details
Type
n/a
Propertyprivate  $warnColor= ''
Details
Type
n/a

Methods

methodpublic__construct( ) : void

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

methodpublicbuildFinished( ) : void

methodpublicbuildStarted( ) : void

methodpublicformatTime( ) : void
static

methodprotectedgetBuildFailedMessage( ) : void

methodprotectedgetBuildSuccessfulMessage( ) : void

methodpublicmessageLogged( ) : void

methodprotectedprintMessage( string $message, \OutputStream $stream, int $priority ) : void
final

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

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

methodpublicsetErrorStream( ) : void

methodpublicsetMessageOutputLevel( ) : void

methodpublicsetOutputStream( ) : void

methodpublictargetFinished( ) : void

methodpublictargetStarted( ) : void

methodpublictaskFinished( ) : void

methodpublictaskStarted( ) : void

Documentation was generated by DocBlox 0.17.1.