summaryrefslogtreecommitdiff
path: root/buildscripts/phing/classes/phing/BuildLogger.php
blob: 03458159d208d5f5f641ecd1e03653652c4bd49f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
/*
 *  $Id: 64eb45bf98f65e415da03c93c4f0d89573a5e29c $
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * This software consists of voluntary contributions made by many individuals
 * and is licensed under the LGPL. For more information please see
 * <http://phing.info>.
 */

require_once 'phing/BuildListener.php';

/**
 * 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$
 * @see       BuildEvent
 * @see       Project::addBuildListener()
 * @package   phing
 */
interface BuildLogger extends BuildListener {

    /**
     * Sets the min log level that this logger should respect.
     * 
     * 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
     *
     * @param int $level The log level integer (e.g. Project::MSG_VERBOSE, etc.).
     */
    public function setMessageOutputLevel($level);

    /**
     * Sets the standard output stream to use.
     * @param OutputStream $output Configured output stream (e.g. STDOUT) for standard output. 
     */
    public function setOutputStream(OutputStream $output);

    /**
     * Sets the output stream to use for errors.
     * @param OutputStream $err Configured output stream (e.g. STDERR) for errors.
     */
    public function setErrorStream(OutputStream $err);

}