# BuildLogger

Extends \BuildListener

Interface for build loggers.

Build loggers are build listeners but with some additional functionality:

- They can be configured with a log level (below which they will ignore messages)
- They have error and output streams

Classes that implement a listener must implement this interface.

author | Hans Lellelid hans@xmpl.org
version | $Id: 695c190fb6a2339063b67d1557a6af553e6ef936 $
see |
see |
package | phing

### Methods

## Fired after the last target has finished.

    buildFinished(\BuildEvent $event)

inherited

see | \BuildEvent::getException()

### Arguments

#### $event

`\BuildEvent`

The BuildEvent

## Fired before any targets are started.

    buildStarted(\BuildEvent $event)

inherited

### Arguments

#### $event

`\BuildEvent`

The BuildEvent

## Fired whenever a message is logged.

    messageLogged(\BuildEvent $event)

inherited

see | \BuildEvent::getMessage()

### Arguments

#### $event

`\BuildEvent`

The BuildEvent

## Sets this logger to produce emacs (and other editor) friendly output.

    setEmacsMode(boolean $emacsMode)

### Arguments

#### $emacsMode

`boolean`

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

## Sets the output stream to use for errors.

    setErrorStream(\OutputStream $err)

### Arguments

#### $err

`\OutputStream`

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

## Sets the min log level that this logger should respect.

    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.).

## Sets the standard output stream to use.

    setOutputStream(\OutputStream $output)

### Arguments

#### $output

`\OutputStream`

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

## Fired when a target has finished.

    targetFinished(\BuildEvent $event)

inherited

see | \\BuildEvent#getException()

### Arguments

#### $event

`\BuildEvent`

The BuildEvent

## Fired when a target is started.

    targetStarted(\BuildEvent $event)

inherited

see | \BuildEvent::getTarget()

### Arguments

#### $event

`\BuildEvent`

The BuildEvent

## Fired when a task has finished.

    taskFinished(\BuildEvent $event)

inherited

see | \BuildEvent::getException()

### Arguments

#### $event

`\BuildEvent`

The BuildEvent

## Fired when a task is started.

    taskStarted(\BuildEvent $event)

inherited

see | \BuildEvent::getTask()

### Arguments

#### $event

`\BuildEvent`

The BuildEvent