KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tools > ant > BuildLogger


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */

18
19 package org.apache.tools.ant;
20
21 import java.io.PrintStream JavaDoc;
22
23 /**
24  * Interface used by Ant to log the build output.
25  *
26  * A build logger is a build listener which has the 'right' to send output to
27  * the ant log, which is usually <code>System.out</code> unless redirected by
28  * the <code>-logfile</code> option.
29  *
30  */

31 public interface BuildLogger extends BuildListener {
32
33     /**
34      * Sets the highest level of message this logger should respond to.
35      *
36      * Only messages with a message level lower than or equal to the
37      * given level should be written to the log.
38      * <P>
39      * Constants for the message levels are in the
40      * {@link Project Project} class. The order of the levels, from least
41      * to most verbose, is <code>MSG_ERR</code>, <code>MSG_WARN</code>,
42      * <code>MSG_INFO</code>, <code>MSG_VERBOSE</code>,
43      * <code>MSG_DEBUG</code>.
44      *
45      * @param level the logging level for the logger.
46      */

47     void setMessageOutputLevel(int level);
48
49     /**
50      * Sets the output stream to which this logger is to send its output.
51      *
52      * @param output The output stream for the logger.
53      * Must not be <code>null</code>.
54      */

55     void setOutputPrintStream(PrintStream JavaDoc output);
56
57     /**
58      * Sets this logger to produce emacs (and other editor) friendly output.
59      *
60      * @param emacsMode <code>true</code> if output is to be unadorned so that
61      * emacs and other editors can parse files names, etc.
62      */

63     void setEmacsMode(boolean emacsMode);
64
65     /**
66      * Sets the output stream to which this logger is to send error messages.
67      *
68      * @param err The error stream for the logger.
69      * Must not be <code>null</code>.
70      */

71     void setErrorPrintStream(PrintStream JavaDoc err);
72 }
73
Popular Tags