# RecorderEntry

Implements \BuildLogger, \SubBuildListener

This is a class that represents a recorder. This is the listener to the build process.

author | Siad Ardroumli siad.ardroumli@gmail.com
package | phing.tasks.system

### Methods

## __construct

    __construct(string $name)

### Arguments

#### $name

`string`

The name of this recorder (used as the filename).

## {@inheritDoc}.

    buildFinished(\BuildEvent $event)

### Arguments

#### $event

`\BuildEvent`

## {@inheritDoc}.

    buildStarted(\BuildEvent $event)

### Arguments

#### $event

`\BuildEvent`

## cleanup

    cleanup()

## Closes the file associated with this recorder.

    closeFile()

Used by Recorder.

## flush

    flush()

## formatTime

    formatTime( $millis)

static

### Arguments

#### $millis

``

## getFilename

    getFilename() : string

### Response

`string`

the name of the file the output is sent to.

## Get the project associated with this recorder entry.

    getProject()

## The thing that actually sends the information to the output.

    log(string $mesg, integer $level)

### Arguments

#### $mesg

`string`

The message to log.

#### $level

`integer`

The verbosity level of the message.

## {@inheritDoc}.

    messageLogged(\BuildEvent $event)

### Arguments

#### $event

`\BuildEvent`

## Initially opens the file associated with this recorder.

    openFile(boolean $append)

Used by Recorder.

throws |

### Arguments

#### $append

`boolean`

Indicates if output must be appended to the logfile or that the logfile should be overwritten.

## openFileImpl

    openFileImpl( $append)

### Arguments

#### $append

``

## Re-opens the file associated with this recorder.

    reopenFile()

Used by Recorder.

throws |

## {@inheritDoc}.

    setEmacsMode(boolean $emacsMode)

### Arguments

#### $emacsMode

`boolean`

true if output is to be unadorned so that emacs and other editors can parse files names, etc.

## {@inheritDoc}.

    setErrorStream(\OutputStream $err)

### Arguments

#### $err

`\OutputStream`

Configured output stream (e.g. STDERR) for errors.

## {@inheritDoc}.

    setMessageOutputLevel(integer $level)

Messages below this level are ignored.

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

### Arguments

#### $level

`integer`

The log level integer (e.g. Project::MSG_VERBOSE, etc.).

## {@inheritDoc}.

    setOutputStream(\OutputStream $output)

### Arguments

#### $output

`\OutputStream`

Configured output stream (e.g. STDOUT) for standard output.

## Set the project associated with this recorder entry.

    setProject(\Project $project)

### Arguments

#### $project

`\Project`

the project instance

## Turns off or on this recorder.

    setRecordState( $state)

### Arguments

#### $state

``

## Cleans up any resources held by this recorder entry at the end of a subbuild if it has been created for the subbuild's project instance.

    subBuildFinished(\BuildEvent $event)

### Arguments

#### $event

`\BuildEvent`

the buildFinished event

## Empty implementation to satisfy the BuildListener interface.

    subBuildStarted(\BuildEvent $event)

### Arguments

#### $event

`\BuildEvent`

the buildStarted event

## {@inheritDoc}.

    targetFinished(\BuildEvent $event)

### Arguments

#### $event

`\BuildEvent`

## {@inheritDoc}.

    targetStarted(\BuildEvent $event)

### Arguments

#### $event

`\BuildEvent`

## {@inheritDoc}.

    taskFinished(\BuildEvent $event)

### Arguments

#### $event

`\BuildEvent`

## {@inheritDoc}.

    taskStarted(\BuildEvent $event)

### Arguments

#### $event

`\BuildEvent`

### Properties

## The name of the file associated with this recorder entry.

    filename : string

var |

### Type(s)

`string`

## The state of the recorder (recorder on or off).

    record : boolean

var |

### Type(s)

`boolean`

## The current verbosity level to record at.

    loglevel :

### Type(s)

``

## The output OutputStream to record to.

    out : \OutputStream

var |

### Type(s)

`\OutputStream`

## The start time of the last know target.

    targetStartTime :

### Type(s)

``

## Strip task banners if true.

    emacsMode :

### Type(s)

``

## project instance the recorder is associated with

    project : \Project

var |

### Type(s)

`\Project`