Adds a listener to the current build process that records the output to a file.
Several recorders can exist at the same time. Each recorder is associated with a file. The filename is used as a unique identifier for the recorders. The first call to the recorder task with an unused filename will create a recorder (using the parameters provided) and add it to the listeners of the build. All subsequent calls to the recorder task using this filename will modify that recorders state (recording or not) or other properties (like logging level).
Some technical issues: the file's print stream is flushed for "finished" events (buildFinished, targetFinished and taskFinished), and is closed on a buildFinished event.
author |
Siad Ardroumli siad.ardroumli@gmail.com |
---|---|
package |
phing.tasks.system |
buildStarted(\BuildEvent $event)
cleanup()
getDescription() : string
string
The text description of the task
getLocation() : \Location
getOwningTarget() : \Target
getProject() : \Project
getRecorder(string $name, \Project $proj) : \RecorderEntry
getRegisterSlot(string $slotName) : \RegisterSlot
getRuntimeConfigurableWrapper() : \RuntimeConfigurable
getTaskName() : string
string
Name of this task
getTaskType() : string
string
The type of this task (XML Tag)
init()
Should throw a BuildException if something goes wrong with the build
This is abstract here, but may not be overloaded by subclasses.
throws | |
---|---|
log(string $msg, integer $level = \Project::MSG_INFO) : void
string
The message to be logged.
integer
The message's priority at this message should have
main()
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.
maybeConfigure()
perform()
throws | |
---|---|
setAction(string $action)
string
The action for the entry to take: start or stop.
setAppend(boolean $append)
boolean
if true, append to a previous file.
setDescription(string $desc)
string
The text describing the task
setEmacsMode(boolean $emacsMode)
boolean
if true use emacs mode
setLocation(\Location $location)
setLoglevel(string $level)
string
the level to set.
setName(string $fname)
string
File name of logfile.
setOwningTarget(\Target $target)
setProject(\Project $project) : void
setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper)
setTaskName(string $name) : string
string
string
A string representing the name of this task for log
setTaskType( $name)
subBuildFinished(\BuildEvent $event)
subBuildStarted(\BuildEvent $event)
targetFinished(\BuildEvent $event)
targetStarted(\BuildEvent $event)
taskFinished(\BuildEvent $event)
taskStarted(\BuildEvent $event)
filename :
append :
start :
loglevel :
emacsMode :
logLevelChoices :
recorderEntries : array<mixed,\RecorderEntry>
description : string
var |
---|
string
taskType : string
var |
---|
string
taskName : string
var |
---|
string
project : \Project