listener/XmlLogger.php
\XmlLogger
Generates a file in the current directory with an XML description of what happened during a build.
The default filename is "log.xml", but this can be overridden with the property
XmlLogger.file
.
- Parent(s)
- \BuildLogger < \BuildListener
- Author
- Michiel Rook
- Version
- $Id: aaf7d77e9952319b9598d786c556be005d34c188 $
Constants
Properties


array
$elementStack= 'array()'
array()
Details- Type
- array
Methods


buildFinished(
\BuildEvent $event
)
:
void
Fired when the build finishes, this adds the time taken and any error stacktrace to the build element and writes the document to disk.
Name | Type | Description |
---|---|---|
$event | \BuildEvent | An event with any relevant extra information. Will not be |


buildStarted(
\BuildEvent $event
)
:
void
Fired when the build starts, this builds the top-level element for the document and remembers the time of the start of the build.
Name | Type | Description |
---|---|---|
$event | \BuildEvent | Ignored. |


messageLogged(
\BuildEvent $event
)
:
void
Fired when a message is logged, this adds a message element to the most appropriate parent element (task, target or build) and records the priority and text of the message.
Name | Type | Description |
---|---|---|
$event | \BuildEvent | An event with any relevant extra information. Will not be |


setErrorStream(
\OutputStream $err
)
:
void
Sets the error stream.
Name | Type | Description |
---|---|---|
$err | \OutputStream |
- See
- \BuildLogger#setErrorStream()


setMessageOutputLevel(
int $level
)
:
void
Set the msgOutputLevel this logger is to respond to.
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
Sets the output stream.
Name | Type | Description |
---|---|---|
$output | \OutputStream |
- See
- \BuildLogger#setOutputStream()


targetFinished(
\BuildEvent $event
)
:
void
Fired when a target finishes building, this adds the time taken to the appropriate target element in the log.
Name | Type | Description |
---|---|---|
$event | \BuildEvent | An event with any relevant extra information. Will not be |


targetStarted(
\BuildEvent $event
)
:
void
Fired when a target starts building, remembers the current time and the name of the target.
Name | Type | Description |
---|---|---|
$event | \BuildEvent | An event with any relevant extra information. Will not be |


taskFinished(
\BuildEvent $event
)
:
void
Fired when a task finishes building, this adds the time taken to the appropriate task element in the log.
Name | Type | Description |
---|---|---|
$event | \BuildEvent | An event with any relevant extra information. Will not be |


taskStarted(
\BuildEvent $event
)
:
void
Fired when a task starts building, remembers the current time and the name of the task.
Name | Type | Description |
---|---|---|
$event | \BuildEvent | An event with any relevant extra information. Will not be |